Skip to content

Commit

Permalink
dev: Run Firestore emulator in CI tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jdkaplan committed Aug 6, 2024
1 parent 8211727 commit 09fd32d
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,23 @@ jobs:
- name: Build
run: go build -v ./...

- uses: google-github-actions/setup-gcloud@v2
with:
version: '>= 486.0.0'
install_components: 'cloud-firestore-emulator'

- name: Start Firestore emulator
run: |
gcloud emulators firestore start --host-port=[::1]:8410 &
until curl '[::1]:8410'; do
sleep 1;
done
- name: Test
run: go test -v ./...
env:
FIRESTORE_EMULATOR_HOST: '[::1]:8410'

- name: Stop Firestore emulator
run: 'gcloud emulators firestore start --host-port=[::1]:8410'

0 comments on commit 09fd32d

Please sign in to comment.