Skip to content

Commit d1f99bc

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

File tree

2 files changed

+11
-18
lines changed

2 files changed

+11
-18
lines changed

.github/workflows/checks.yml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,14 @@ jobs:
2020
- name: Checkout
2121
uses: actions/checkout@v4
2222

23-
- name: Set up Python
24-
uses: actions/setup-python@v5
23+
- name: Install uv
24+
uses: astral-sh/setup-uv@v5
2525

2626
- name: Install mypy
27-
run: |
28-
pip install --upgrade pip
29-
pip install mypy
30-
mypy --version
27+
run: uv pip install mypy
3128

3229
- name: Install dependencies
33-
run: pip install typing-extensions
30+
run: uv sync
3431

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

.github/workflows/tests.yml

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,21 +20,17 @@ jobs:
2020
- name: Checkout
2121
uses: actions/checkout@v4
2222

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

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

3129
- name: Install nox
32-
run: |
33-
pip install nox
34-
nox --version
30+
run: uv pip install nox
3531

3632
- name: Run tests
37-
run: nox -s test-${{ matrix.python }}
33+
run: uv run nox -s test-${{ matrix.python }}
3834

3935
- name: Send coverage report
4036
uses: codecov/codecov-action@v5

0 commit comments

Comments
 (0)