I have some security tests that I can run locally on the firestore emulator. The process looks like this:
In terminal tab 1, start the emulator:
firebase emulators:start --only firestore
In terminal tab 2, run the tests
yarn test rules
I would like to run these tests as GitHub Actions for CI. It currently looks like this:
- name: Test Security Rules
run: |
firebase emulators:start --only firestore
yarn test rules
The issue is that starting the emulators doesn't return so it hangs and eventually times out.
emulators: All emulators started, it is now safe to connect.
I am hoping to find out how to start the emulator, know when it is ready (or wait N seconds), run the tests, and then (optionally) close the process.