Skip to content

ci: Modularize CI pipeline and test Python >= 3.11 #38

ci: Modularize CI pipeline and test Python >= 3.11

ci: Modularize CI pipeline and test Python >= 3.11 #38

Workflow file for this run

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'
- continue-on-error: True
run: |
python --version