Skip to content

Commit 46b0b4b

Browse files
eifingerdfl-aeb
authored andcommitted
Use uv managed python in GHA workflows (Azure-Samples#2342)
Less overhead makes this easier to maintain and enables using hardlinking on Windows runners
1 parent 56f627b commit 46b0b4b

File tree

1 file changed

+5
-11
lines changed

1 file changed

+5
-11
lines changed

.github/workflows/python-test.yaml

+5-11
Original file line numberDiff line numberDiff line change
@@ -26,21 +26,15 @@ jobs:
2626
matrix:
2727
os: ["ubuntu-20.04", "windows-latest"]
2828
python_version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
29-
env:
30-
UV_SYSTEM_PYTHON: 1
3129
steps:
3230
- uses: actions/checkout@v4
33-
- name: Setup python
34-
uses: actions/setup-python@v5
35-
with:
36-
python-version: ${{ matrix.python_version }}
37-
architecture: x64
3831
- name: Install uv
3932
uses: astral-sh/setup-uv@v5
4033
with:
4134
enable-cache: true
4235
version: "0.4.20"
4336
cache-dependency-glob: "requirements**.txt"
37+
python-version: ${{ matrix.python_version }}
4438
- name: Setup node
4539
uses: actions/setup-node@v4
4640
with:
@@ -58,20 +52,20 @@ jobs:
5852
- name: Check types with mypy
5953
run: |
6054
cd scripts/
61-
python3 -m mypy . --config-file=../pyproject.toml
55+
mypy . --config-file=../pyproject.toml
6256
cd ../app/backend/
63-
python3 -m mypy . --config-file=../../pyproject.toml
57+
mypy . --config-file=../../pyproject.toml
6458
- name: Check formatting with black
6559
run: black . --check --verbose
6660
- name: Run Python tests
6761
if: runner.os != 'Windows'
68-
run: python3 -m pytest -s -vv --cov --cov-fail-under=86
62+
run: pytest -s -vv --cov --cov-fail-under=86
6963
- name: Run E2E tests with Playwright
7064
id: e2e
7165
if: runner.os != 'Windows'
7266
run: |
7367
playwright install chromium --with-deps
74-
python3 -m pytest tests/e2e.py --tracing=retain-on-failure
68+
pytest tests/e2e.py --tracing=retain-on-failure
7569
- name: Upload test artifacts
7670
if: ${{ failure() && steps.e2e.conclusion == 'failure' }}
7771
uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)