Skip to content

Commit 719f115

Browse files
authored
CI: Lint and test via uv (#652)
1 parent 25f1059 commit 719f115

File tree

2 files changed

+37
-8
lines changed

2 files changed

+37
-8
lines changed

.github/workflows/ci.yml

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,37 +2,44 @@ name: Tests
22

33
on: [push, pull_request, workflow_dispatch]
44

5+
permissions:
6+
contents: read
7+
58
env:
69
FORCE_COLOR: 1
710

811
jobs:
912
test:
1013
name: Python ${{ matrix.python-version }}
11-
1214
runs-on: ubuntu-latest
13-
1415
strategy:
1516
fail-fast: false
1617
matrix:
1718
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
1819

1920
steps:
2021
- uses: actions/checkout@v4
22+
with:
23+
persist-credentials: false
24+
2125
- name: Set up Python ${{ matrix.python-version }}
2226
uses: actions/setup-python@v5
2327
id: python-install
2428
with:
2529
python-version: ${{ matrix.python-version }}
26-
cache: pip
30+
allow-prereleases: true
31+
32+
- name: Install uv
33+
uses: hynek/setup-cached-uv@v2
34+
with:
2735
cache-dependency-path: |
2836
requirements.txt
2937
dev-requirements.txt
30-
allow-prereleases: true
31-
- name: Install tox
38+
39+
- name: Tox tests
3240
run: |
33-
python -m pip install tox
34-
- name: Run Tests
35-
run: tox -e py
41+
uvx --with tox-uv tox -e py
42+
3643
- uses: codecov/codecov-action@v4
3744
if: always()
3845
with:

.github/workflows/lint.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Lint
2+
3+
on: [push, pull_request, workflow_dispatch]
4+
5+
env:
6+
FORCE_COLOR: 1
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
lint:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@v4
17+
with:
18+
persist-credentials: false
19+
- uses: actions/setup-python@v5
20+
with:
21+
python-version: "3.x"
22+
- uses: tox-dev/action-pre-commit-uv@v1

0 commit comments

Comments
 (0)