88 CI : true
99
1010jobs :
11- build :
12- runs-on : ubuntu-latest
13- steps :
14- - uses : actions/checkout@v3
15- - uses : actions/setup-node@v3
16- with :
17- node-version : 22.x
18- cache : npm
19- - run : npm ci
20- - run : npm run build
21- - run : npm pack
22- - name : Upload tarball
23- uses : actions/upload-artifact@v4
24- with :
25- name : package-tarball
26- path : firebase-functions-*.tgz
27-
2811 lint :
2912 runs-on : ubuntu-latest
3013 if : github.event_name == 'pull_request'
4225 cache : npm
4326 - run : npm ci
4427 - run : npm run lint
45-
4628 unit :
4729 runs-on : ubuntu-latest
4830 strategy :
@@ -53,35 +35,17 @@ jobs:
5335 - 22.x
5436 - 24.x
5537 steps :
56- - uses : actions/checkout@v3
57- - uses : actions/setup-node@v3
38+ - uses : actions/checkout@v1
39+ - uses : actions/setup-node@v1
5840 with :
5941 node-version : ${{ matrix.node-version }}
60- cache : npm
42+ - name : Cache npm
43+ uses : actions/cache@v4
44+ with :
45+ path : ~/.npm
46+ key : ${{ runner.os }}-node-${{ matrix.node-version }}-${{ hashFiles('**/package-lock.json') }}
6147 - run : npm ci
6248 - run : npm run test
63-
64- packaging :
65- needs : build
66- runs-on : ubuntu-latest
67- strategy :
68- matrix :
69- node-version :
70- - 18.x
71- - 20.x
72- - 22.x
73- - 24.x
74- steps :
75- - uses : actions/checkout@v3
76- - uses : actions/setup-node@v3
77- with :
78- node-version : ${{ matrix.node-version }}
79- - name : Download tarball
80- uses : actions/download-artifact@v4
81- with :
82- name : package-tarball
83- - run : chmod +x ./scripts/test-packaging.sh && ./scripts/test-packaging.sh firebase-functions-*.tgz
84-
8549 integration :
8650 needs : " unit"
8751 runs-on : ubuntu-latest
@@ -93,10 +57,14 @@ jobs:
9357 - 22.x
9458 - 24.x
9559 steps :
96- - uses : actions/checkout@v3
97- - uses : actions/setup-node@v3
60+ - uses : actions/checkout@v1
61+ - uses : actions/setup-node@v1
9862 with :
9963 node-version : ${{ matrix.node-version }}
100- cache : npm
64+ - name : Cache npm
65+ uses : actions/cache@v4
66+ with :
67+ path : ~/.npm
68+ key : ${{ runner.os }}-node-${{ matrix.node-version }}-${{ hashFiles('**/package-lock.json') }}
10169 - run : npm ci
10270 - run : npm run test:bin
0 commit comments