refactor/move-prompts-to-jinja-templates #2640
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Python check | |
on: | |
push: | |
branches: [ main ] | |
paths-ignore: | |
- "**.md" | |
- ".azdo/**" | |
- ".devcontainer/**" | |
- ".github/**" | |
pull_request: | |
branches: [ main ] | |
paths-ignore: | |
- "**.md" | |
- ".azdo/**" | |
- ".devcontainer/**" | |
- ".github/**" | |
workflow_call: | |
jobs: | |
test_package: | |
name: Test ${{ matrix.os }} Python ${{ matrix.python_version }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: ["ubuntu-20.04", "windows-latest"] | |
python_version: ["3.9", "3.10", "3.11", "3.12"] | |
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@v3 | |
with: | |
enable-cache: true | |
version: "0.4.20" | |
cache-dependency-glob: "requirements**.txt" | |
- name: Setup node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
- name: Build frontend | |
run: | | |
cd ./app/frontend | |
npm install | |
npm run build | |
- name: Install dependencies | |
run: | | |
uv pip install -r requirements-dev.txt | |
- name: Lint with ruff | |
run: ruff check . | |
- name: Check types with mypy | |
run: | | |
cd scripts/ | |
python3 -m mypy . --config-file=../pyproject.toml | |
cd ../app/backend/ | |
python3 -m 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 | |
- 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 | |
- name: Upload test artifacts | |
if: ${{ failure() && steps.e2e.conclusion == 'failure' }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: playwright-traces${{ matrix.python_version }} | |
path: test-results |