-
Notifications
You must be signed in to change notification settings - Fork 71
ci: add caching of emulators #205
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -93,13 +93,21 @@ jobs: | |||||
| - name: Install dependencies | ||||||
| run: pnpm install | ||||||
|
|
||||||
| - name: Cache Firebase emulators | ||||||
| uses: actions/cache@v4 | ||||||
| with: | ||||||
| path: ~/.cache/firebase/emulators | ||||||
| key: ${{ runner.os }}-firebase-emulators-${{ hashFiles('.github/workflows/release.yml') }} | ||||||
| restore-keys: | | ||||||
| ${{ runner.os }}-firebase-emulators- | ||||||
|
|
||||||
| - name: Install Firebase CLI | ||||||
| uses: nick-invision/retry@v3 | ||||||
| with: | ||||||
| timeout_minutes: 10 | ||||||
| retry_wait_seconds: 60 | ||||||
| max_attempts: 3 | ||||||
| command: npm i -g firebase-tools@14 | ||||||
| command: npm i -g firebase-tools@latest | ||||||
|
||||||
| command: npm i -g firebase-tools@latest | |
| command: npm i -g firebase-tools@12.6.1 |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -92,13 +92,21 @@ jobs: | |||||
| sudo apt-get install -y openjdk-17-jdk | ||||||
| java -version | ||||||
|
|
||||||
| - name: Cache Firebase emulators | ||||||
| uses: actions/cache@v4 | ||||||
| with: | ||||||
| path: ~/.cache/firebase/emulators | ||||||
| key: ${{ runner.os }}-firebase-emulators-${{ hashFiles('.github/workflows/tests.yaml') }} | ||||||
|
||||||
| key: ${{ runner.os }}-firebase-emulators-${{ hashFiles('.github/workflows/tests.yaml') }} | |
| key: ${{ runner.os }}-firebase-emulators-${{ hashFiles('package.json', 'firebase.json') }} |
Copilot
AI
Aug 18, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using @latest for firebase-tools in CI can lead to unpredictable builds when new versions are released. Consider pinning to a specific version or using a version range to ensure build reproducibility.
| command: npm i -g firebase-tools@latest | |
| command: npm i -g firebase-tools@12.4.3 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,6 +12,9 @@ | |
| "database": { | ||
| "port": 9000 | ||
| }, | ||
| "dataconnect": { | ||
| "port": 9399 | ||
| }, | ||
| "ui": { | ||
| "enabled": true | ||
| } | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The cache key includes a hash of the workflow file itself, which will invalidate the cache every time this workflow is modified. Consider using a more stable hash like package.json or firebase.json instead, as emulator binaries don't change with workflow modifications.