ci: bump golangci-lint-action to v7; drop firestore emulator

- 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.
This commit is contained in:
2026-05-09 17:18:36 +07:00
parent d9a136cb40
commit 5e4e5ba7d2
+7 -26
View File
@@ -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 ./...