Skip to content

Commit 60d2288

Browse files
committed
Adding the caching
1 parent aba932b commit 60d2288

File tree

1 file changed

+18
-7
lines changed

1 file changed

+18
-7
lines changed

.github/workflows/ci.yml

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@ jobs:
1212

1313
steps:
1414
- uses: actions/checkout@v1
15+
- name: Cache Firebase CLI
16+
uses: actions/cache@v1
17+
id: cache
18+
with:
19+
path: ~/.cache
20+
key: firebase-cli
1521
- name: Set up Python ${{ matrix.python }}
1622
uses: actions/setup-python@v1
1723
with:
@@ -26,11 +32,16 @@ jobs:
2632
- name: Test with pytest
2733
if: success() || failure()
2834
run: pytest
29-
- name: Set up Node.js 10
30-
uses: actions/setup-node@v1
31-
with:
32-
node-version: 10.x
33-
- name: Run integration tests against emulator
35+
- name: Set up CLI
36+
if: steps.cache.outputs.cache-hit != 'true'
3437
run: |
35-
npm install -g firebase-tools
36-
firebase emulators:exec --only database --project fake-project-id 'pytest integration/test_db.py'
38+
curl -o ${HOME}/.cache/bin/firebase --create-dirs -sL https://firebase.tools/bin/linux/latest
39+
chmod +x ${HOME}/.cache/bin/firebase
40+
- name: Add Firebase to path
41+
run: |
42+
echo Home is $HOME
43+
echo GitHub Workspace is $GITHUB_WORKSPACE
44+
ls -l ${HOME}/.cache
45+
echo "::add-path::${HOME}/.cache/bin"
46+
- name: Run integration tests against emulator
47+
run: firebase emulators:exec --only database --project fake-project-id 'pytest integration/test_db.py'

0 commit comments

Comments
 (0)