Skip to content

Commit 66e344d

Browse files
committed
ci: use uv for installing Python packages
Signed-off-by: Filipe Laíns <lains@riseup.net>
1 parent 262f264 commit 66e344d

File tree

2 files changed

+17
-22
lines changed

2 files changed

+17
-22
lines changed

.github/workflows/checks.yml

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,20 @@ 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
2526

26-
- name: Install mypy
27-
run: |
28-
pip install --upgrade pip
29-
pip install mypy
30-
mypy --version
27+
- name: Setup venv
28+
run: uv venv
3129

3230
- name: Install dependencies
33-
run: pip install typing-extensions
31+
run: uv sync
3432

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

.github/workflows/tests.yml

Lines changed: 9 additions & 12 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

31-
- name: Install nox
32-
run: |
33-
pip install nox
34-
nox --version
30+
- name: Setup venv
31+
run: uv venv
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)