Skip to content

Commit c0d97ed

Browse files
AchoArnoldCopilot
andcommitted
ci: add integration test workflow
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 0ad73e5 commit c0d97ed

1 file changed

Lines changed: 52 additions & 0 deletions

File tree

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: integration-test
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
integration-test:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout 🛎
16+
uses: actions/checkout@v4
17+
18+
- name: Set up Go
19+
uses: actions/setup-go@v5
20+
with:
21+
go-version: "1.22"
22+
23+
- name: Load Firebase credentials
24+
run: |
25+
echo "FIREBASE_CREDENTIALS=$(jq -c . tests/firebase-credentials.json)" >> $GITHUB_ENV
26+
27+
- name: Start services 🐳
28+
working-directory: ./tests
29+
run: docker compose up -d --build --wait
30+
31+
- name: Wait for seed to complete
32+
working-directory: ./tests
33+
run: |
34+
echo "Waiting for seed container to finish..."
35+
docker compose wait seed || true
36+
sleep 2
37+
38+
- name: Run integration tests 🧪
39+
working-directory: ./tests
40+
run: go test -v -timeout 120s ./...
41+
42+
- name: Collect logs on failure 📋
43+
if: failure()
44+
working-directory: ./tests
45+
run: |
46+
docker compose logs api
47+
docker compose logs emulator
48+
49+
- name: Stop services 🛑
50+
if: always()
51+
working-directory: ./tests
52+
run: docker compose down -v

0 commit comments

Comments
 (0)