GitHub Actions recipe for bqemulator¶
Reference workflow showing two canonical patterns:
-
Service container — start
bqemulatoronce per job using theservices:block. Best for fast, hermetic Python/Node/Go test suites that talk to a single emulator instance. -
Testcontainers-driven — let your test harness start the emulator on demand. Best for Java/Scio/Beam suites where the test framework already manages container lifecycle.
Pairs with CI/CD patterns guide.
Layout¶
workflow.yml — the canonical workflow your repo would copy
meta-test.sh — verifies the YAML parses and the patterns
match what's documented
Run¶
make test runs meta-test.sh, which:
- Lints
workflow.ymlwithyamllint(or justpython -c "import yaml; yaml.safe_load(...)"fallback). - Verifies the
services:block namesbqemulatorexactly once. - Verifies the documented health-check command appears.
Adapting the recipe¶
Copy workflow.yml into your .github/workflows/ directory and edit:
BQEMU_IMAGEenv var — pin to the version you want (e.g.ghcr.io/jjviscomi/bqemulator:1.1.2).- The
test:step — replace with your project's test command.