name: CI on: push: branches: [main] pull_request: branches: [main] concurrency: group: ci-${{ github.ref }} cancel-in-progress: true permissions: contents: read jobs: go: name: Go runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-go@v5 with: go-version: "1.25" - name: Create web build placeholder for embed run: mkdir -p web/build && echo "placeholder" > web/build/.gitkeep - name: Run go vet run: go vet ./... - name: Run tests run: go test ./... - name: Run tests with race detector if: github.ref == 'refs/heads/main' run: go test -race ./... - name: Build binary run: go build -o pad ./cmd/pad - name: Verify binary runs run: ./pad --help web: name: Web 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 - name: Install dependencies run: npm ci - name: Build run: npm run build - name: Type check (svelte-check) run: npm run check