|
6 | 6 | - main |
7 | 7 | pull_request: |
8 | 8 |
|
| 9 | +permissions: |
| 10 | + contents: read |
| 11 | + |
9 | 12 | jobs: |
10 | | - verify: |
| 13 | + contract-drift: |
| 14 | + name: Contract Drift |
11 | 15 | runs-on: ubuntu-latest |
| 16 | + steps: |
| 17 | + - name: Checkout |
| 18 | + uses: actions/checkout@v4 |
| 19 | + |
| 20 | + - name: Setup Node |
| 21 | + uses: actions/setup-node@v4 |
| 22 | + with: |
| 23 | + node-version-file: .nvmrc |
| 24 | + cache: npm |
| 25 | + cache-dependency-path: package-lock.json |
| 26 | + |
| 27 | + - name: Install root tooling |
| 28 | + run: npm ci |
| 29 | + |
| 30 | + - name: Verify generated API types |
| 31 | + run: npm run check:contract |
| 32 | + |
| 33 | + frontend: |
| 34 | + name: Frontend |
| 35 | + runs-on: ubuntu-latest |
| 36 | + steps: |
| 37 | + - name: Checkout |
| 38 | + uses: actions/checkout@v4 |
| 39 | + |
| 40 | + - name: Setup Node |
| 41 | + uses: actions/setup-node@v4 |
| 42 | + with: |
| 43 | + node-version-file: .nvmrc |
| 44 | + cache: npm |
| 45 | + cache-dependency-path: frontend/package-lock.json |
| 46 | + |
| 47 | + - name: Install frontend dependencies |
| 48 | + run: npm ci |
| 49 | + working-directory: frontend |
| 50 | + |
| 51 | + - name: Lint frontend |
| 52 | + run: npm run lint:strict |
| 53 | + working-directory: frontend |
| 54 | + |
| 55 | + - name: Typecheck frontend |
| 56 | + run: npm run typecheck |
| 57 | + working-directory: frontend |
| 58 | + |
| 59 | + - name: Build frontend |
| 60 | + run: npm run build |
| 61 | + working-directory: frontend |
| 62 | + |
| 63 | + backend: |
| 64 | + name: Backend |
| 65 | + runs-on: ubuntu-latest |
| 66 | + steps: |
| 67 | + - name: Checkout |
| 68 | + uses: actions/checkout@v4 |
| 69 | + |
| 70 | + - name: Setup Python |
| 71 | + uses: actions/setup-python@v5 |
| 72 | + with: |
| 73 | + python-version: "3.12" |
| 74 | + cache: pip |
| 75 | + cache-dependency-path: backend/pyproject.toml |
| 76 | + |
| 77 | + - name: Install backend dependencies |
| 78 | + run: | |
| 79 | + python -m pip install --upgrade pip |
| 80 | + python -m pip install -e ./backend[dev] |
| 81 | +
|
| 82 | + - name: Run backend tests |
| 83 | + run: python -m pytest |
| 84 | + working-directory: backend |
| 85 | + |
| 86 | + - name: Compile backend package |
| 87 | + run: python -m compileall app |
| 88 | + working-directory: backend |
| 89 | + |
| 90 | + root-check-windows: |
| 91 | + name: Root Check (Windows) |
| 92 | + runs-on: windows-latest |
12 | 93 | steps: |
13 | 94 | - name: Checkout |
14 | 95 | uses: actions/checkout@v4 |
|
26 | 107 | uses: actions/setup-python@v5 |
27 | 108 | with: |
28 | 109 | python-version: "3.12" |
| 110 | + cache: pip |
| 111 | + cache-dependency-path: backend/pyproject.toml |
29 | 112 |
|
30 | 113 | - name: Install root tooling |
31 | 114 | run: npm ci |
|
39 | 122 | python -m pip install --upgrade pip |
40 | 123 | python -m pip install -e ./backend[dev] |
41 | 124 |
|
42 | | - - name: Generate API types |
43 | | - run: npm run api:types |
| 125 | + - name: Verify generated API types |
| 126 | + run: npm run check:contract |
44 | 127 |
|
45 | | - - name: Run template checks |
| 128 | + - name: Run root verification |
46 | 129 | run: npm run check |
0 commit comments