name: CI on: push: branches: [main, develop] jobs: go: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-go@v5 with: go-version-file: go.mod # cmd/gui (Fyne) uses cgo and links against the system's OpenGL/X11 # *and* Wayland libraries (go-gl/glfw compiles in both backends), so # building or testing ./... needs all of these present even though # the GUI itself never opens a window in CI. Found by a real failure # here, not guessed: go vet failed with "wayland-client-core.h: No # such file or directory" when only libgl1-mesa-dev/xorg-dev were # installed. - name: Install system dependencies for the Fyne GUI build run: | sudo apt-get update sudo apt-get install -y libgl1-mesa-dev xorg-dev libwayland-dev libxkbcommon-dev - name: gofmt run: | fmt_out="$(gofmt -l .)" if [ -n "$fmt_out" ]; then echo "The following files are not gofmt'd:" echo "$fmt_out" exit 1 fi - name: go vet run: go vet ./... - name: go build run: go build ./... - name: go test run: go test ./... - name: go mod tidy (no diff expected) run: | go mod tidy git diff --exit-code -- go.mod go.sum sqlc: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: sqlc-dev/setup-sqlc@v4 with: sqlc-version: "1.31.1" - name: sqlc diff (generated code must match the schema/queries) run: sqlc diff 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: Test run: npm test # Builds the image on every push as a health check (catches a broken # Dockerfile immediately); doesn't push anywhere. release.yml does the # same build and pushes it. docker: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: docker/setup-buildx-action@v3 - name: Build uses: docker/build-push-action@v5 with: context: . file: ./Dockerfile push: false