@@ -21,32 +21,14 @@ jobs:
2121 - name : Checkout
2222 uses : actions/checkout@v2
2323 - name : Setup node
24- uses : actions/setup-node@v2-beta
24+ uses : actions/setup-node@v3
2525 with :
2626 node-version : ' 14'
27- - name : node_modules cache
28- id : node_modules_cache
29- uses : actions/cache@v2
30- with :
31- path : ./node_modules
32- key : ${{ runner.os }}-14-node_modules-${{ hashFiles('**/yarn.lock') }}
33- restore-keys : |
34- ${{ runner.os }}-14-node_modules-
35- - name : Yarn offline cache
36- if : steps.node_modules_cache.outputs.cache-hit != 'true'
37- uses : actions/cache@v2
38- with :
39- path : ~/.npm-packages-offline-cache
40- key : yarn-offline-${{ hashFiles('**/yarn.lock') }}
41- restore-keys : yarn-offline
27+ cache : ' npm'
4228 - name : Install deps
43- if : steps.node_modules_cache.outputs.cache-hit != 'true'
44- run : |
45- yarn config set yarn-offline-mirror ~/.npm-packages-offline-cache
46- yarn config set yarn-offline-mirror-pruning true
47- yarn install --frozen-lockfile --prefer-offline
29+ run : npm ci
4830 - name : Build
49- id : yarn- pack-dir
31+ id : pack-dir
5032 run : ./build.sh
5133 - name : ' Upload Artifact'
5234 uses : actions/upload-artifact@v2
@@ -62,37 +44,20 @@ jobs:
6244 needs : build
6345 strategy :
6446 matrix :
65- node : ["12 ", "14 "]
47+ node : ["14 ", "16 "]
6648 fail-fast : false
6749 name : Test Node.js ${{ matrix.node }} (Ubuntu)
6850 steps :
6951 - name : Checkout
7052 uses : actions/checkout@v2
7153 - name : Setup node
72- uses : actions/setup-node@v2-beta
54+ uses : actions/setup-node@v3
7355 with :
7456 node-version : ${{ matrix.node }}
7557 check-latest : true
76- - name : node_modules cache
77- id : node_modules_cache
78- uses : actions/cache@v2
79- with :
80- path : ./node_modules
81- key : ${{ runner.os }}-${{ matrix.node }}-node_modules-${{ hashFiles('**/yarn.lock') }}
82- restore-keys : |
83- ${{ runner.os }}-${{ matrix.node }}-node_modules-
84- - name : Yarn offline cache
85- if : steps.node_modules_cache.outputs.cache-hit != 'true'
86- uses : actions/cache@v2
87- with :
88- path : ~/.npm-packages-offline-cache
89- key : yarn-offline-${{ hashFiles('**/yarn.lock') }}
90- restore-keys : yarn-offline
58+ cache : ' npm'
9159 - name : Install deps
92- if : steps.node_modules_cache.outputs.cache-hit != 'true'
93- run : |
94- yarn config set yarn-offline-mirror ~/.npm-packages-offline-cache
95- yarn install --frozen-lockfile --prefer-offline
60+ run : npm ci
9661 - name : Install deps for functions
9762 run : npm install
9863 working-directory : ./functions
@@ -108,15 +73,15 @@ jobs:
10873 chmod +x reactfire-${{ github.run_id }}/unpack.sh
10974 ./reactfire-${{ github.run_id }}/unpack.sh
11075 - name : Run tests
111- run : yarn test
76+ run : npm run test
11277 publish :
11378 runs-on : ubuntu-latest
11479 name : Publish (NPM)
11580 needs : test
11681 if : ${{ github.ref == 'refs/heads/main' || github.event_name == 'release' }}
11782 steps :
11883 - name : Setup node
119- uses : actions/setup-node@v2-beta
84+ uses : actions/setup-node@v3
12085 with :
12186 node-version : ' 14'
12287 registry-url : ' https://registry.npmjs.org'
0 commit comments