Skip to content

Commit b63b687

Browse files
committed
ci(pytest): use uv to install pytest environment
1 parent d94ac71 commit b63b687

File tree

1 file changed

+6
-14
lines changed

1 file changed

+6
-14
lines changed

.github/workflows/pytest.yml

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -40,25 +40,17 @@ jobs:
4040
- name: Checkout
4141
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
4242

43-
- name: Set up Python ${{ matrix.python-version }}
44-
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
43+
# https://docs.astral.sh/uv/guides/integration/github/
44+
- name: Install uv and set the python version
45+
uses: astral-sh/setup-uv@7edac99f961f18b581bbd960d59d049f04c0002f # v6.4.1
4546
with:
4647
python-version: ${{ matrix.python-version }}
47-
48-
- name: Set up pip cache
49-
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
50-
with:
51-
path: |
52-
~/.cache/pip
53-
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('**/pyproject.toml') }}
54-
restore-keys: |
55-
${{ runner.os }}-pip-${{ matrix.python-version }}-
56-
${{ runner.os }}-pip-
48+
activate-environment: true
5749

5850
- name: Install dependencies and application
5951
# without --editable the coverage report is not generated correctly
6052
run: |
61-
pip install --editable .[dev]
53+
uv pip install --editable .[dev]
6254
6355
- name: Test with pytest
6456
id: pytest
@@ -67,7 +59,7 @@ jobs:
6759
export LIBGL_ALWAYS_SOFTWARE=1
6860
export DISPLAY=:99
6961
Xvfb :99 -screen 0 1024x768x16 &
70-
pytest --cov=ardupilot_methodic_configurator --cov-report=xml:tests/coverage.xml --md=tests/results-${{ matrix.python-version }}.md --junit-xml=tests/results-junit.xml
62+
uv run pytest --cov=ardupilot_methodic_configurator --cov-report=xml:tests/coverage.xml --md=tests/results-${{ matrix.python-version }}.md --junit-xml=tests/results-junit.xml
7163
7264
- name: Fix coverage paths
7365
run: |

0 commit comments

Comments
 (0)