Skip to content

Commit a6b984b

Browse files
committed
ci: update python setup
Signed-off-by: Nathaniel Starkman <nstarman@users.noreply.github.com>
1 parent 9fcb191 commit a6b984b

4 files changed

Lines changed: 61 additions & 22 deletions

File tree

.github/workflows/ci.yml

Lines changed: 12 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,16 @@ jobs:
2222
runs-on: ubuntu-latest
2323
steps:
2424
- uses: actions/checkout@v4
25-
with:
26-
fetch-depth: 0
27-
- uses: actions/setup-python@v5
28-
with:
29-
python-version: "3.x"
25+
- name: Install uv
26+
uses: astral-sh/setup-uv@v6
27+
- name: Install the project
28+
run: uv sync --locked --group nox
29+
3030
- uses: pre-commit/action@v3.0.1
3131
with:
3232
extra_args: --hook-stage manual --all-files
3333
- name: Run PyLint
34-
run: pipx run nox -s pylint -- --output-format=github
34+
run: uv run --frozen nox -s pylint -- --output-format=github
3535

3636
checks:
3737
name: Check Python ${{ matrix.python-version }} on ${{ matrix.runs-on }}
@@ -43,26 +43,17 @@ jobs:
4343
python-version: ["3.9", "3.13"]
4444
runs-on: [ubuntu-latest, windows-latest, macos-14]
4545

46-
include:
47-
- python-version: "pypy-3.10"
48-
runs-on: ubuntu-latest
49-
5046
steps:
5147
- uses: actions/checkout@v4
52-
with:
53-
fetch-depth: 0
54-
55-
- uses: actions/setup-python@v5
56-
with:
57-
python-version: ${{ matrix.python-version }}
58-
allow-prereleases: true
59-
60-
- name: Install package
61-
run: python -m pip install .[test]
48+
- name: Install uv
49+
uses: astral-sh/setup-uv@v6
50+
- name: Install the project
51+
run: uv sync --locked --group test
6252

6353
- name: Test package
6454
run: >-
65-
python -m pytest -ra --cov --cov-report=xml --cov-report=term
55+
uv run --frozen pytest
56+
--cov --cov-report=xml --cov-report=term
6657
--durations=20
6758
6859
- name: Upload coverage report

noxfile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
nox.needs_version = ">=2024.3.2"
1111
nox.options.sessions = ["lint", "pylint", "tests"]
12-
nox.options.default_venv_backend = "uv|virtualenv"
12+
nox.options.default_venv_backend = "uv"
1313

1414

1515
@nox.session

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
"pytest-cov >=3",
4747
"pytest-github-actions-annotate-failures",
4848
"sybil",
49+
"nox"
4950
]
5051

5152
[project.urls]

uv.lock

Lines changed: 47 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)