Skip to content

Commit e7b7705

Browse files
authored
CI: Lint and test via uv (#705)
1 parent 273a1c6 commit e7b7705

File tree

2 files changed

+18
-11
lines changed

2 files changed

+18
-11
lines changed

.github/workflows/ci.yml

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,15 @@ 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:
10-
name: test w/ Python ${{ matrix.python-version }}
13+
name: Python ${{ matrix.python-version }}
1114
runs-on: ubuntu-latest
1215
strategy:
1316
fail-fast: false
@@ -17,23 +20,26 @@ jobs:
1720

1821
steps:
1922
- uses: actions/checkout@v4
23+
with:
24+
persist-credentials: false
25+
2026
- name: Set up Python ${{ matrix.python-version }}
2127
uses: actions/setup-python@v5
2228
with:
2329
python-version: ${{ matrix.python-version }}
2430
allow-prereleases: true
25-
cache: pip
31+
32+
- name: Install uv
33+
uses: hynek/setup-cached-uv@v2
34+
with:
2635
cache-dependency-path: |
2736
requirements.txt
2837
dev-requirements.txt
29-
- name: Install tox
38+
39+
- name: Tox tests
3040
run: |
31-
python -m pip install tox
32-
- name: Run Tests
33-
env:
34-
# run against the current Python interpreter
35-
TOXENV: py
36-
run: tox
41+
uvx --with tox-uv tox -e py
42+
3743
- uses: codecov/codecov-action@v4
3844
if: always()
3945
with:

.github/workflows/lint.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@ jobs:
1414

1515
steps:
1616
- uses: actions/checkout@v4
17+
with:
18+
persist-credentials: false
1719
- uses: actions/setup-python@v5
1820
with:
1921
python-version: "3.x"
20-
cache: pip
21-
- uses: pre-commit/[email protected]
22+
- uses: tox-dev/action-pre-commit-uv@v1

0 commit comments

Comments
 (0)