name: CI on: push: branches: [main] pull_request: jobs: scripts: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Syntax-check every shell script run: | set -eu for f in scripts/get.sh; do echo "-- $f (sh) --"; sh -n "$f"; done for f in scripts/build.sh scripts/linux/*.sh; do echo "-- $f (bash) --"; bash -n "$f"; done backend: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-go@v5 with: go-version-file: go.mod - uses: actions/setup-node@v4 with: node-version: "22" cache: npm cache-dependency-path: web/package-lock.json # web/embed.go does `//go:embed all:dist` — go build/vet/test all # fail without a built frontend to embed, so build it first. - name: Build frontend (for go:embed) run: | cd web npm ci npm run build - run: go vet ./... - run: go build ./... - run: go test ./... frontend: runs-on: ubuntu-latest defaults: run: working-directory: web steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: node-version: "22" cache: npm cache-dependency-path: web/package-lock.json - run: npm ci - run: npm run lint - run: npm test - run: npm run build