File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2323 with :
2424 go-version : " 1.22"
2525
26- - name : Load Firebase credentials
26+ - name : Generate Firebase credentials
2727 run : |
28+ bash tests/generate-firebase-credentials.sh tests/firebase-credentials.json
2829 echo "FIREBASE_CREDENTIALS=$(jq -c . tests/firebase-credentials.json)" >> $GITHUB_ENV
2930
3031 - name : Start services 🐳
Original file line number Diff line number Diff line change 66android /app /debug /
77* main.exe *
88android /app /release /
9+
10+ tests /firebase-credentials.json
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ # Generates a fake Firebase service account JSON for integration tests.
3+ # The RSA key is throwaway — it only needs to be valid so the Firebase SDK can sign JWTs.
4+ # The emulator does not validate these tokens.
5+
6+ set -e
7+
8+ OUTFILE=" ${1:- firebase-credentials.json} "
9+
10+ # Generate a 2048-bit RSA key
11+ PRIVATE_KEY=$( openssl genrsa 2048 2> /dev/null)
12+
13+ # Escape newlines for JSON embedding
14+ PRIVATE_KEY_ESCAPED=$( echo " $PRIVATE_KEY " | awk ' {printf "%s\\n", $0}' )
15+
16+ cat > " $OUTFILE " << EOF
17+ {
18+ "type": "service_account",
19+ "project_id": "httpsms-test",
20+ "private_key_id": "test-key-id",
21+ "private_key": "${PRIVATE_KEY_ESCAPED} ",
22+ "client_email": "test@httpsms-test.iam.gserviceaccount.com",
23+ "client_id": "123456789",
24+ "auth_uri": "http://emulator:9090/auth",
25+ "token_uri": "http://emulator:9090/token",
26+ "auth_provider_x509_cert_url": "http://emulator:9090/certs",
27+ "client_x509_cert_url": "http://emulator:9090/certs/test"
28+ }
29+ EOF
30+
31+ echo " Generated $OUTFILE "
You can’t perform that action at this time.
0 commit comments