aboutsummaryrefslogtreecommitdiffhomepage
path: root/.github/workflows/ci.yaml
blob: 8186ece7192e7f37653052e70d5beab579e299ac (plain)
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
name: CI

on:
  push:
    branches: [main]
  pull_request:
    branches: [main]

jobs:
  ci:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v4

      - name: Setup Go
        uses: actions/setup-go@v5
        with:
          go-version: "1.24"
          cache-dependency-path: backend/go.sum

      - name: Setup Node.js
        uses: actions/setup-node@v4
        with:
          node-version: "22"
          cache: "npm"
          cache-dependency-path: |
            frontend/package-lock.json
            typespec/package-lock.json

      - name: Install just
        uses: extractions/setup-just@v3

      - name: Install frontend dependencies
        run: npm ci
        working-directory: frontend

      - name: Install typespec dependencies
        run: npm ci
        working-directory: typespec

      - name: Run check
        run: just check

      - name: Run build
        run: just build

      - name: Run fmt
        run: just fmt

      - name: Check for uncommitted changes
        run: |
          if [ -n "$(git status --porcelain)" ]; then
            echo "Error: Found uncommitted changes after running 'just fmt' or 'just generate'"
            git diff --stat=9999
            exit 1
          fi