name: Backend CI on: push: paths: - "server/**" - ".github/workflows/backend-ci.yml" pull_request: paths: - "server/**" - ".github/workflows/backend-ci.yml" permissions: contents: read jobs: backend: runs-on: ubuntu-latest defaults: run: working-directory: server steps: - name: Checkout uses: actions/checkout@v4 - name: Setup Go uses: actions/setup-go@v5 with: go-version-file: server/go.mod cache-dependency-path: server/go.sum - name: Add Go bin to PATH run: echo "$(go env GOPATH)/bin" >> "$GITHUB_PATH" - name: Install sqlc run: go install github.com/sqlc-dev/sqlc/cmd/sqlc@v1.30.0 - name: Generate sqlc code run: make sqlc-generate - name: Verify generated code is committed run: git diff --exit-code -- internal/tenant/repository/generated - name: Check tenant SQL scope guard run: make tenant-scope-guard - name: Run tests run: make test - name: Run golangci-lint uses: golangci/golangci-lint-action@v6 with: version: v1.59.1 working-directory: server args: ./...