|
5 | 5 | branches: [main] |
6 | 6 | workflow_call: |
7 | 7 |
|
| 8 | +concurrency: |
| 9 | + group: ci-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} |
| 10 | + cancel-in-progress: true |
| 11 | + |
| 12 | +permissions: |
| 13 | + contents: read |
| 14 | + |
8 | 15 | jobs: |
9 | 16 | lint-python: |
10 | 17 | name: Ruff (Python) |
11 | 18 | runs-on: ubuntu-latest |
| 19 | + timeout-minutes: 10 |
12 | 20 | steps: |
13 | 21 | - uses: actions/checkout@v4 |
14 | 22 | - uses: astral-sh/ruff-action@v3 |
15 | 23 |
|
16 | 24 | test-python: |
17 | 25 | name: Unit Tests (Python) |
18 | 26 | runs-on: ubuntu-latest |
| 27 | + timeout-minutes: 15 |
19 | 28 | steps: |
20 | 29 | - uses: actions/checkout@v4 |
21 | 30 | - uses: actions/setup-python@v5 |
22 | 31 | with: |
23 | 32 | python-version: "3.12" |
24 | | - - shell: bash |
| 33 | + cache: "pip" |
| 34 | + - name: Install Python dependencies |
25 | 35 | run: python -m pip install -r requirements.txt |
26 | | - - shell: bash |
| 36 | + - name: Run Python unit tests |
27 | 37 | run: python -m unittest discover -s tests -p 'test_*.py' |
28 | 38 |
|
29 | 39 | typecheck-ts: |
30 | 40 | name: TypeScript (${{ matrix.os }}) |
31 | 41 | runs-on: ${{ matrix.os }} |
| 42 | + timeout-minutes: 10 |
32 | 43 | strategy: |
| 44 | + fail-fast: false |
33 | 45 | matrix: |
34 | 46 | os: [ubuntu-latest, windows-latest] |
| 47 | + defaults: |
| 48 | + run: |
| 49 | + working-directory: ui |
35 | 50 | steps: |
36 | 51 | - uses: actions/checkout@v4 |
37 | 52 | - uses: oven-sh/setup-bun@v2 |
38 | | - - shell: bash |
39 | | - run: cd ui && bun install --frozen-lockfile 2>/dev/null || bun install |
40 | | - - shell: bash |
41 | | - run: cd ui && bun run typecheck |
| 53 | + - name: Install UI dependencies |
| 54 | + run: bun install --frozen-lockfile |
| 55 | + - name: Run TypeScript typecheck |
| 56 | + run: bun run typecheck |
42 | 57 |
|
43 | 58 | test-ts: |
44 | 59 | name: Unit Tests (TypeScript) |
45 | 60 | runs-on: ubuntu-latest |
| 61 | + timeout-minutes: 10 |
| 62 | + defaults: |
| 63 | + run: |
| 64 | + working-directory: ui |
46 | 65 | steps: |
47 | 66 | - uses: actions/checkout@v4 |
48 | 67 | - uses: oven-sh/setup-bun@v2 |
49 | | - - shell: bash |
50 | | - run: cd ui && bun install --frozen-lockfile 2>/dev/null || bun install |
51 | | - - shell: bash |
52 | | - run: cd ui && bun run test |
| 68 | + - name: Install UI dependencies |
| 69 | + run: bun install --frozen-lockfile |
| 70 | + - name: Run TypeScript unit tests |
| 71 | + run: bun run test |
0 commit comments