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: Backend | |
on: | |
pull_request: | |
paths: | |
- 'src/**' | |
- 'tests/**' | |
- 'pyproject.toml' | |
- 'Makefile' | |
- 'requirements*.txt' | |
- '.github/workflows/backend.yml' | |
permissions: | |
contents: read | |
jobs: | |
lint-backend: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12" | |
cache: 'pip' | |
- name: Lint backend | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install --upgrade pre-commit | |
pre-commit run --all-files ruff | |
test-backend: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12" | |
cache: 'pip' | |
- name: Build frontend and share library | |
shell: bash | |
run: make build-frontend | |
- name: Build package distributions | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install --upgrade build | |
python -m build | |
- name: Install | |
run: | | |
python -m pip install dist/*.whl --no-dependencies | |
python -m pip install -r requirements.txt -r requirements-test.txt | |
- name: Pytest | |
timeout-minutes: 5 | |
run: python -m pytest | |
test-backend-on-old-python: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.9", "3.10", "3.11"] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: 'pip' | |
- name: | |
continue-on-error: True |