4
4
push :
5
5
branches :
6
6
- master
7
+ - v16
7
8
paths-ignore :
8
9
- " **/*.md"
9
10
pull_request :
@@ -26,29 +27,20 @@ jobs:
26
27
uses : actions/setup-node@v3
27
28
with :
28
29
node-version : ' 18'
29
- check-latest : true
30
+ check-latest : false
30
31
- name : node_modules cache
31
32
uses : actions/cache@v3
32
33
id : node_modules_cache
33
34
with :
34
35
path : ./node_modules
35
- key : ${{ runner.os }}-16-12-9-9-6-node_modules-${{ hashFiles('yarn.lock') }}
36
- - name : Yarn offline cache
37
- if : steps.node_modules_cache.outputs.cache-hit != 'true'
38
- uses : actions/cache@v3
39
- with :
40
- path : ~/.npm-packages-offline-cache
41
- key : yarn-offline-${{ hashFiles('**/yarn.lock') }}
36
+ key : ${{ runner.os }}-18-${{ hashFiles('package-lock.json') }}
37
+ restore-keys : |
38
+ ${{ runner.os }}-18-
42
39
- name : Install deps
43
40
if : steps.node_modules_cache.outputs.cache-hit != 'true'
44
41
run : |
45
- yarn config set ignore-engines true
46
- yarn config set yarn-offline-mirror ~/.npm-packages-offline-cache
47
- yarn config set network-timeout 300000
48
- yarn config set yarn-offline-mirror-pruning true
49
- yarn install --frozen-lockfile --prefer-offline
42
+ npm ci
50
43
- name : Build
51
- id : yarn-pack-dir
52
44
run : ./tools/build.sh
53
45
- name : ' Upload Artifact'
54
46
uses : actions/upload-artifact@v3
@@ -79,36 +71,28 @@ jobs:
79
71
uses : actions/cache@v3
80
72
with :
81
73
path : ./node_modules
82
- key : ${{ runner.os }}-${{ matrix.node }}-16-9-12-8-node_modules-${{ hashFiles('yarn.lock') }}
83
- - name : Yarn offline cache
84
- uses : actions/cache@v3
85
- with :
86
- path : ~/.npm-packages-offline-cache
87
- key : yarn-offline-${{ hashFiles('**/yarn.lock') }}
88
- - name : Configure yarn
89
- run : |
90
- yarn config set yarn-offline-mirror ~/.npm-packages-offline-cache
91
- yarn config set network-timeout 300000
92
- yarn config set ignore-engines true
93
- - name : Yarn install
74
+ key : ${{ runner.os }}-${{ matrix.node }}-${{ hashFiles('package-lock.json') }}
75
+ restore-keys : |
76
+ ${{ runner.os }}-${{ matrix.node }}-
77
+ - name : Install deps
94
78
if : steps.node_modules_cache.outputs.cache-hit != 'true'
95
- run : yarn install --frozen-lockfile --prefer-offline
79
+ run : npm ci
96
80
- name : Download Artifacts
97
81
uses : actions/download-artifact@v3
98
82
- name : Relocate Artifacts
99
83
run : mv angularfire-${{ github.run_id }} dist
100
84
- name : Test Node
101
85
run : |
102
- yarn build:jasmine
103
- yarn test:node
104
- - name : ng-build yarn install
105
- run : |
106
- cd ./test/ng-build
107
- yarn --prefer-offline
108
- - name : ng-build prerender
109
- run : |
110
- cd ./test/ng-build
111
- yarn prerender
86
+ npm run build:jasmine
87
+ npm run test:node
88
+ # - name: ng-build yarn install
89
+ # run: |
90
+ # cd ./test/ng-build
91
+ # yarn --prefer-offline
92
+ # - name: ng-build prerender
93
+ # run: |
94
+ # cd ./test/ng-build
95
+ # yarn prerender
112
96
113
97
browser :
114
98
runs-on : ${{ matrix.os }}
@@ -129,7 +113,7 @@ jobs:
129
113
uses : actions/setup-node@v3
130
114
with :
131
115
node-version : 18
132
- check-latest : true
116
+ check-latest : false
133
117
- name : Setup java
134
118
uses : actions/setup-java@v3
135
119
with :
@@ -140,20 +124,12 @@ jobs:
140
124
uses : actions/cache@v3
141
125
with :
142
126
path : ./node_modules
143
- key : ${{ runner.os }}-${{ matrix.node }}-16-9-12-8-node_modules-${{ hashFiles('yarn.lock') }}
144
- - name : Yarn offline cache
145
- uses : actions/cache@v3
146
- with :
147
- path : ~/.npm-packages-offline-cache
148
- key : yarn-offline-${{ hashFiles('**/yarn.lock') }}
149
- - name : Configure yarn
150
- run : |
151
- yarn config set yarn-offline-mirror ~/.npm-packages-offline-cache
152
- yarn config set network-timeout 300000
153
- yarn config set ignore-engines true
154
- - name : Yarn install
127
+ key : ${{ runner.os }}-${{ matrix.node }}-${{ hashFiles('package-lock.json') }}
128
+ restore-keys : |
129
+ ${{ runner.os }}-${{ matrix.node }}-
130
+ - name : Install deps
155
131
if : steps.node_modules_cache.outputs.cache-hit != 'true'
156
- run : yarn install --frozen-lockfile --prefer-offline
132
+ run : npm ci
157
133
- name : Firebase emulator cache
158
134
uses : actions/cache@v3
159
135
with :
@@ -164,7 +140,7 @@ jobs:
164
140
- name : Relocate Artifacts
165
141
run : mv angularfire-${{ github.run_id }} dist
166
142
- name : Test browser
167
- run : yarn test:${{ matrix.browser }}
143
+ run : npm run test:${{ matrix.browser }}
168
144
169
145
contribute :
170
146
runs-on : ${{ matrix.os }}
@@ -187,28 +163,20 @@ jobs:
187
163
id : node_modules_cache
188
164
with :
189
165
path : ./node_modules
190
- key : ${{ runner.os }}-${{ matrix.node }}-12-9-9-6-node_modules-${{ hashFiles('yarn.lock') }}
191
- - name : Yarn offline cache
192
- if : steps.node_modules_cache.outputs.cache-hit != 'true'
193
- uses : actions/cache@v3
194
- with :
195
- path : ~/.npm-packages-offline-cache
196
- key : yarn-offline-${{ hashFiles('**/yarn.lock') }}
166
+ key : ${{ runner.os }}-${{ matrix.node }}-${{ hashFiles('package-lock.json') }}
167
+ restore-keys : |
168
+ ${{ runner.os }}-${{ matrix.node }}-
197
169
- name : Install deps
198
170
if : steps.node_modules_cache.outputs.cache-hit != 'true'
199
- run : |
200
- yarn config set yarn-offline-mirror ~/.npm-packages-offline-cache
201
- yarn config set network-timeout 300000
202
- yarn config set ignore-engines true
203
- yarn install --frozen-lockfile --prefer-offline
171
+ run : npm ci
204
172
- name : Lint
205
- run : yarn lint
173
+ run : npm run lint
206
174
- name : Build
207
- run : yarn build
175
+ run : npm run build
208
176
- name : Test Node
209
177
run : |
210
- yarn build:jasmine
211
- yarn test:node
178
+ npm run build:jasmine
179
+ npm run test:node
212
180
- name : Firebase emulator cache
213
181
uses : actions/cache@v3
214
182
with :
@@ -220,7 +188,7 @@ jobs:
220
188
distribution : ' temurin'
221
189
java-version : ' 11'
222
190
- name : Test headless
223
- run : yarn test:chrome-headless
191
+ run : npm run test:chrome-headless
224
192
# Tests are flaky on Windows
225
193
continue-on-error : ${{ matrix.os == 'windows-latest' }}
226
194
@@ -243,7 +211,7 @@ jobs:
243
211
with :
244
212
node-version : ' 18'
245
213
registry-url : ' https://registry.npmjs.org'
246
- check-latest : true
214
+ check-latest : false
247
215
- name : ' Download Artifacts'
248
216
uses : actions/download-artifact@v3
249
217
- name : Publish
0 commit comments