Skip to content

Commit c40b6d5

Browse files
committed
ci(pytest): use uv to install pytest environment
1 parent 524e27f commit c40b6d5

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

.github/workflows/pytest.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,18 @@ 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@445689ea25e0de0a23313031f5fe577c74ae45a1 # v6.3.0
4546
with:
4647
python-version: ${{ matrix.python-version }}
48+
activate-environment: true
4749

4850
- name: Install dependencies
4951
run: |
50-
python -m pip install 'pip==25.0.1'
51-
pip install -e .[dev]
52+
# pip causes unit tests to crash when combined with uv, so avoid installing it
53+
# uv pip install 'pip==25.1.1'
54+
uv pip install --editable .[dev]
5255
5356
- name: Install apt packages
5457
run: |
@@ -61,7 +64,7 @@ jobs:
6164
run: |
6265
export DISPLAY=:99
6366
Xvfb :99 -screen 0 1024x768x16 &
64-
pytest --cov=ardupilot_methodic_configurator --cov-report=xml:tests/coverage.xml --md=tests/results-${{ matrix.python-version }}.md --junit-xml=tests/results-junit.xml
67+
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
6568
6669
- name: Fix coverage paths
6770
run: |

0 commit comments

Comments
 (0)