Skip to content

Commit f63bb65

Browse files
committed
ci: add caching of emulators
1 parent 2589791 commit f63bb65

File tree

3 files changed

+21
-2
lines changed

3 files changed

+21
-2
lines changed

.github/workflows/release.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,13 +93,21 @@ jobs:
9393
- name: Install dependencies
9494
run: pnpm install
9595

96+
- name: Cache Firebase emulators
97+
uses: actions/cache@v4
98+
with:
99+
path: ~/.cache/firebase/emulators
100+
key: ${{ runner.os }}-firebase-emulators-${{ hashFiles('.github/workflows/release.yml') }}
101+
restore-keys: |
102+
${{ runner.os }}-firebase-emulators-
103+
96104
- name: Install Firebase CLI
97105
uses: nick-invision/retry@v3
98106
with:
99107
timeout_minutes: 10
100108
retry_wait_seconds: 60
101109
max_attempts: 3
102-
command: npm i -g firebase-tools@14
110+
command: npm i -g firebase-tools@latest
103111

104112
- name: Run tests with emulator
105113
run: pnpm test:emulator

.github/workflows/tests.yaml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,13 +92,21 @@ jobs:
9292
sudo apt-get install -y openjdk-17-jdk
9393
java -version
9494
95+
- name: Cache Firebase emulators
96+
uses: actions/cache@v4
97+
with:
98+
path: ~/.cache/firebase/emulators
99+
key: ${{ runner.os }}-firebase-emulators-${{ hashFiles('.github/workflows/tests.yaml') }}
100+
restore-keys: |
101+
${{ runner.os }}-firebase-emulators-
102+
95103
- name: Install Firebase CLI
96104
uses: nick-invision/retry@v3
97105
with:
98106
timeout_minutes: 10
99107
retry_wait_seconds: 60
100108
max_attempts: 3
101-
command: npm i -g firebase-tools@14
109+
command: npm i -g firebase-tools@latest
102110

103111
# Determine which packages have changed
104112
- name: Determine changed packages

firebase.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212
"database": {
1313
"port": 9000
1414
},
15+
"dataconnect": {
16+
"port": 9399
17+
},
1518
"ui": {
1619
"enabled": true
1720
}

0 commit comments

Comments
 (0)