【发布时间】:2020-06-29 19:48:13
【问题描述】:
我有一些可以在 Firestore 模拟器上本地运行的安全测试。流程如下:
在终端选项卡 1 中,启动模拟器:
firebase emulators:start --only firestore
在终端选项卡 2 中,运行测试
yarn test rules
我想以 GitHub Actions for CI 的形式运行这些测试。目前看起来是这样的:
- name: Test Security Rules
run: |
firebase emulators:start --only firestore
yarn test rules
问题是启动模拟器没有返回,所以它挂起并最终超时。
emulators: All emulators started, it is now safe to connect.
我希望了解如何启动模拟器,知道它何时准备就绪(或等待 N 秒),运行测试,然后(可选)关闭进程。
【问题讨论】:
标签: firebase google-cloud-firestore github-actions firebase-cli