Repository navigation
48 lines (45 loc) · 1.63 KB
/
Copy pathci.yml
File metadata and controls
48 lines (45 loc) · 1.63 KB
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
name: CI
on:
push:
branches: [main]
pull_request:
jobs:
frontend:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
cache-dependency-path: frontend/package-lock.json
- working-directory: frontend
run: |
npm ci
npm run type-check
npx vitest run
npm run build
backend:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.10"
cache: pip
cache-dependency-path: backend/requirements.txt
- name: Install system deps
run: sudo apt-get update && sudo apt-get install -y ffmpeg libsndfile1
- working-directory: backend
env:
# The app creates CERT_DIR at import time (default /data/certificates, not creatable on a
# runner) and refuses to start without SECRET_KEY; without these every test module failed
# at collection ("PermissionError: /data") - backend CI was red on main since 2026-09-02.
CERT_DIR: ${{ runner.temp }}/certificates
SECRET_KEY: ci-${{ github.run_id }}-${{ github.sha }}
DATABASE_URL: sqlite:///${{ runner.temp }}/ci.db
run: |
pip install -r requirements.txt
# independent CWR 2.1 grammar used by tests/test_independent_grammar.py (the test skips itself if this cannot be installed)
pip install CWR-API || echo "CWR-API unavailable: the independent grammar test will be skipped"
pytest -q --no-header