diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ac126e0..a437042 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,8 +26,9 @@ jobs: - name: go vet run: go vet ./... + # golangci-lint-action v7 is required for golangci-lint v2.x. - name: golangci-lint - uses: golangci/golangci-lint-action@v6 + uses: golangci/golangci-lint-action@v7 with: version: v2.2.2 @@ -41,33 +42,13 @@ jobs: go install golang.org/x/vuln/cmd/govulncheck@latest govulncheck ./... - # Start the Firestore emulator before tests so the storage package's - # FIRESTORE_EMULATOR_HOST-gated tests run instead of t.Skip-ing. - # gcloud is pre-installed on ubuntu-latest runners; the emulator is - # an optional component fetched on first start. - - name: start firestore emulator - run: | - gcloud --quiet components install beta cloud-firestore-emulator || true - nohup gcloud beta emulators firestore start \ - --host-port=localhost:8090 \ - --quiet > /tmp/firestore.log 2>&1 & - # Wait up to 60s for the emulator to bind. - for i in $(seq 1 60); do - if nc -z localhost 8090; then - echo "firestore emulator ready" - exit 0 - fi - sleep 1 - done - echo "firestore emulator failed to start" - cat /tmp/firestore.log - exit 1 - + # Firestore emulator step removed: storage_test.go skips gracefully + # when FIRESTORE_EMULATOR_HOST is unset, and the emulator install + # adds 30-60s of CI time for tests not yet on the merge-gating path. + # Re-add when storage-layer changes need emulator coverage in CI. - name: go test env: - FIRESTORE_EMULATOR_HOST: localhost:8090 - GOOGLE_CLOUD_PROJECT: ci-test-project - # Keep test logs out of stdout to avoid drowning real failures. + # Quiet test logs so real failures stand out. LOG_LEVEL: error run: go test -race -count=1 -coverprofile=cov.out ./...