Skip to content

👷 use uv venv in ci, add python 3.12 to testing matrix #301

👷 use uv venv in ci, add python 3.12 to testing matrix

👷 use uv venv in ci, add python 3.12 to testing matrix #301

Workflow file for this run

name: filingcabinet CI
on:
push:
pull_request:
branches: [main]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9
- name: Install dependencies
run: pnpm install
- uses: pre-commit/[email protected]
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.10', '3.12']
steps:
- uses: actions/checkout@v4
- name: Setup uv
uses: astral-sh/setup-uv@v2
with:
enable-cache: true
cache-dependency-glob: |
uv.lock
pyproject.toml
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9
- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
- name: Install system-level dependencies
run: sudo apt-get update && sudo apt-get install python3-dev libmagic-dev libmagickwand-dev poppler-utils libpoppler-cpp-dev
- name: Setup venv
run: |
uv venv --python ${{ matrix.python-version }}
source .venv/bin/activate
echo PATH=$PATH >> $GITHUB_ENV
- name: Install dependencies
run: |
uv sync --extra test --frozen
uv pip install -e . --no-deps
pnpm install
- name: Build frontend
run: pnpm run build
- name: Run tests
run: |
coverage run --branch -m pytest -m "not slow"
coverage report --format=markdown >> $GITHUB_STEP_SUMMARY