Skip to content

Use uv managed python in GHA workflows #2342

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 10, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 5 additions & 11 deletions .github/workflows/python-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,21 +26,15 @@ jobs:
matrix:
os: ["ubuntu-20.04", "windows-latest"]
python_version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
env:
UV_SYSTEM_PYTHON: 1
steps:
- uses: actions/checkout@v4
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python_version }}
architecture: x64
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
version: "0.4.20"
cache-dependency-glob: "requirements**.txt"
python-version: ${{ matrix.python_version }}
- name: Setup node
uses: actions/setup-node@v4
with:
Expand All @@ -58,20 +52,20 @@ jobs:
- name: Check types with mypy
run: |
cd scripts/
python3 -m mypy . --config-file=../pyproject.toml
mypy . --config-file=../pyproject.toml
cd ../app/backend/
python3 -m mypy . --config-file=../../pyproject.toml
mypy . --config-file=../../pyproject.toml
- name: Check formatting with black
run: black . --check --verbose
- name: Run Python tests
if: runner.os != 'Windows'
run: python3 -m pytest -s -vv --cov --cov-fail-under=86
run: pytest -s -vv --cov --cov-fail-under=86
- name: Run E2E tests with Playwright
id: e2e
if: runner.os != 'Windows'
run: |
playwright install chromium --with-deps
python3 -m pytest tests/e2e.py --tracing=retain-on-failure
pytest tests/e2e.py --tracing=retain-on-failure
- name: Upload test artifacts
if: ${{ failure() && steps.e2e.conclusion == 'failure' }}
uses: actions/upload-artifact@v4
Expand Down