forked from google-oss-bot/firebase-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
80 lines (66 loc) · 1.91 KB
/
Copy pathnode-test.yml
File metadata and controls
80 lines (66 loc) · 1.91 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
name: CI Tests
on:
- pull_request
- push
env:
CI: true
jobs:
unit:
runs-on: ubuntu-latest
strategy:
matrix:
node-version:
- 8.x
- 10.x
- 12.x
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Cache npm
uses: actions/cache@v1
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ matrix.node-version }}-${{ hashFiles('**/package-lock.json') }}
- run: npm ci
- run: npm test
integration:
needs: unit
if: github.repository == 'firebase/firebase-tools' && github.event_name == 'push'
runs-on: ubuntu-latest
env:
FIREBASE_EMULATORS_PATH: ${{ github.workspace }}/emulator-cache
COMMIT_SHA: ${{ github.sha }}
CI_JOB_ID: ${{ github.action }}
FBTOOLS_TARGET_PROJECT: ${{ secrets.FBTOOLS_TARGET_PROJECT }}
strategy:
fail-fast: false
matrix:
node-version:
- 8.x
script:
- ./scripts/test-hosting.sh
- ./scripts/test-triggers-end-to-end.sh
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 8.x
- name: Cache npm
uses: actions/cache@v1
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ matrix.node-version }}-${{ hashFiles('**/package-lock.json') }}
- name: Cache firebase emulators
uses: actions/cache@v1
with:
path: ${{ env.FIREBASE_EMULATORS_PATH }}
key: ${{ runner.os }}-firebase-emulators-${{ hashFiles('emulator-cache/**') }}
continue-on-error: true
- run: npm ci
- run: echo ${{ secrets.service_account_json_base64 }} | base64 -d > ./scripts/service-account.json
- run: ${{ matrix.script }}
- name: Print debug logs
if: failure()
run: find . -type f -name "*debug.log" | xargs cat