Skip to content

Commit c4a8d0e

Browse files
authored
GitHub Actions pytest workflow now uses uv instead of nox (#1370)
GitHub Actions pytest workflow now uses uv instead of nox
1 parent 9fc5683 commit c4a8d0e

File tree

4 files changed

+19
-49
lines changed

4 files changed

+19
-49
lines changed

.github/workflows/build.yml

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,29 +2,36 @@
22
# https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions
33
name: "build"
44

5-
on: [ push, pull_request ]
5+
on: [push, pull_request]
66

77
jobs:
88
build:
99
strategy:
1010
fail-fast: false
1111
matrix:
12-
os: [ ubuntu-latest, macos-latest, windows-latest ]
13-
python-version: [ "3.8", "3.9", "3.10", "3.11", "3.12", "3.13" ]
12+
os: [ubuntu-latest, macos-latest, windows-latest]
13+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
1414
runs-on: ${{ matrix.os }}
1515
steps:
16-
- uses: actions/checkout@v4 # https://github.com/actions/checkout
16+
- uses: actions/checkout@v4 # https://github.com/actions/checkout
1717
with:
1818
# Only a single commit is fetched by default, for the ref/SHA that triggered the workflow.
1919
# Set fetch-depth: 0 to fetch all history for all branches and tags.
2020
fetch-depth: 0 # Needed for setuptools_scm to work correctly
21-
- uses: actions/setup-python@v5 # https://github.com/actions/setup-python
21+
- name: Install uv
22+
uses: astral-sh/setup-uv@v3
23+
24+
- name: Set up Python ${{ matrix.python-version }}
25+
uses: actions/setup-python@v5
2226
with:
2327
python-version: ${{ matrix.python-version }}
2428
allow-prereleases: true
25-
- name: Install dependencies
26-
run: python -m pip install --upgrade pip setuptools setuptools-scm nox
27-
- name: Run tests and post coverage results
28-
env:
29-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30-
run: python -m nox --non-interactive --session tests-${{ matrix.python-version }} # Run nox for a single version of Python
29+
30+
- name: Install the project
31+
run: uv sync --all-extras --dev
32+
33+
- name: Run tests
34+
run: uv run inv pytest --junit --no-pty --base
35+
36+
- name: Run isolated tests
37+
run: uv run inv pytest --junit --no-pty --isolated

noxfile.py

Lines changed: 0 additions & 25 deletions
This file was deleted.

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ dev = [
5252
"doc8",
5353
"invoke",
5454
"mypy",
55-
"nox",
5655
"pytest",
5756
"pytest-cov",
5857
"pytest-mock",

tasks.py

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def rmrf(items, verbose=True):
4949

5050
#####
5151
#
52-
# pytest, nox, pylint, and codecov
52+
# pytest, pylint, and codecov
5353
#
5454
#####
5555

@@ -117,17 +117,6 @@ def mypy_clean(context):
117117
namespace_clean.add_task(mypy_clean, 'mypy')
118118

119119

120-
@invoke.task
121-
def nox_clean(context):
122-
"""Remove nox virtualenvs and logs"""
123-
# pylint: disable=unused-argument
124-
with context.cd(TASK_ROOT_STR):
125-
rmrf('.nox')
126-
127-
128-
namespace_clean.add_task(nox_clean, 'nox')
129-
130-
131120
#####
132121
#
133122
# documentation

0 commit comments

Comments
 (0)