-
Notifications
You must be signed in to change notification settings - Fork 3
60 lines (57 loc) · 1.58 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
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