From 5e4e5ba7d253c027a63c5e2235741d4cb8a5860b Mon Sep 17 00:00:00 2001 From: tiennm99 Date: Sat, 9 May 2026 17:18:36 +0700 Subject: [PATCH] ci: bump golangci-lint-action to v7; drop firestore emulator MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - golangci-lint-action@v6 doesn't support golangci-lint v2.x; v7 does. This was the only thing breaking CI; subsequent steps were skipped. - Firestore emulator step removed for now — storage_test.go skips when FIRESTORE_EMULATOR_HOST is unset, and the gcloud 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. --- .github/workflows/ci.yml | 33 +++++++-------------------------- 1 file changed, 7 insertions(+), 26 deletions(-) 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 ./...