Skip to content

Commit 71c53af

Browse files
committed
ci: use uv for installing Python packages
Signed-off-by: Filipe Laíns <lains@riseup.net>
1 parent 260dc20 commit 71c53af

File tree

2 files changed

+18
-20
lines changed

2 files changed

+18
-20
lines changed

.github/workflows/checks.yml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,23 @@ jobs:
1515
fail-fast: false
1616
matrix:
1717
python: ['3.9', '3.10', '3.11', '3.12', '3.13']
18-
18+
env:
19+
VIRTUAL_ENV: .venv
1920
steps:
2021
- name: Checkout
2122
uses: actions/checkout@v4
2223

23-
- name: Set up Python
24-
uses: actions/setup-python@v5
24+
- name: Install uv
25+
uses: astral-sh/setup-uv@v5
26+
27+
- name: Setup venv
28+
run: uv venv
2529

2630
- name: Install mypy
27-
run: |
28-
pip install --upgrade pip
29-
pip install mypy
30-
mypy --version
31+
run: uv pip install mypy
3132

3233
- name: Install dependencies
33-
run: pip install typing-extensions
34+
run: uv sync
3435

3536
- name: Run mypy
36-
run: mypy --python-version ${{ matrix.python }} -p hid_parser
37+
run: uv run mypy --python-version ${{ matrix.python }} -p hid_parser

.github/workflows/tests.yml

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,26 +15,23 @@ jobs:
1515
fail-fast: false
1616
matrix:
1717
python: ['3.9', '3.10', '3.11', '3.12', '3.13']
18-
18+
env:
19+
VIRTUAL_ENV: .venv
1920
steps:
2021
- name: Checkout
2122
uses: actions/checkout@v4
2223

23-
- name: Set up target Python
24-
uses: actions/setup-python@v5
25-
with:
26-
python-version: ${{ matrix.python }}
24+
- name: Install uv
25+
uses: astral-sh/setup-uv@v5
2726

28-
- name: Set up Python
29-
uses: actions/setup-python@v5
27+
- name: Setup Python
28+
run: uv python install ${{ matrix.python }}
3029

3130
- name: Install nox
32-
run: |
33-
pip install nox
34-
nox --version
31+
run: uv pip install nox
3532

3633
- name: Run tests
37-
run: nox -s test-${{ matrix.python }}
34+
run: uv run nox -s test-${{ matrix.python }}
3835

3936
- name: Send coverage report
4037
uses: codecov/codecov-action@v5

0 commit comments

Comments
 (0)