75
75
# cache: "npm"
76
76
# cache-dependency-path: "**/package-lock.json"
77
77
- name : setup project
78
- run : npm i --ignore-scripts --include=optional --loglevel=silly
78
+ run : npm i --ignore-scripts --include=optional --loglevel=silly
79
79
- name : test
80
80
run : npm run test:lint
81
81
@@ -95,13 +95,16 @@ jobs:
95
95
# cache: "npm"
96
96
# cache-dependency-path: "**/package-lock.json"
97
97
- name : setup project
98
- run : npm i --ignore-scripts --include=optional --loglevel=silly
98
+ run : >
99
+ npm i
100
+ --ignore-scripts --loglevel=silly
101
+ -w tools/code-style --include-workspace-root
99
102
- name : make reports dir
100
103
run : mkdir -p "$REPORTS_DIR"
101
104
- name : test
102
105
run : >
103
106
npm run --
104
- test:standard
107
+ test:standard --
105
108
--format checkstyle
106
109
--output-file "$REPORTS_DIR/eslint.xml"
107
110
- name : Publish Checkstyle report
@@ -157,28 +160,39 @@ jobs:
157
160
run : |
158
161
set -ex
159
162
dep_constraints=''
160
- dev_requirements='c8 mocha npm-run-all fast-glob'
163
+ dev_requirements=' c8 mocha npm-run-all2 fast-glob '
161
164
# as long as npm cannot auto-resolve engine-constraints, we need to help here
162
165
case "$NODE_VERSION" in
163
166
'16')
164
- # for some stupid reason, NPM tries to resolve dev-packages, event hey are to be omitted.
165
- # this is frustrating when NPM is not resolving to compatible versions ...so drop them here
166
- npm uninstall --save-dev eslint-plugin-jsdoc
167
+ dev_requirements="${dev_requirements/ c8 / c8@^9 }"
168
+ ;;
169
+ '14')
170
+ dev_requirements="${dev_requirements/ c8 / c8@^9 }"
171
+ dev_requirements="${dev_requirements/ npm-run-all2 / npm-run-all2@^5 }"
167
172
;;
168
173
'14.0.0')
169
- dev_requirements='c8@^8 mocha npm-run-all fast-glob'
174
+ dev_requirements="${dev_requirements/ c8 / c8@^8 }"
175
+ dev_requirements="${dev_requirements/ npm-run-all2 / npm-run-all2@^5 }"
170
176
;;
171
177
esac
178
+ echo "::group::install dep_constraints"
172
179
## !! dont install all the dev-packages, especially since some are not runnable on node 14.0.0
173
180
if [[ -n "$dep_constraints" ]]
174
181
then
175
- npm add --ignore-scripts --omit=dev --only=prod --production --loglevel=silly --save $dep_constraints
182
+ npm add --workspaces=false -- ignore-scripts --omit=dev --only=prod --production --loglevel=silly --save $dep_constraints
176
183
fi
177
- npm i --ignore-scripts --include=optional --omit=dev --only=prod --production --loglevel=silly
184
+ echo "::endgroup::"
185
+ echo "::group::install deps"
186
+ npm i --workspaces=false --ignore-scripts --include=optional --omit=dev --only=prod --production --loglevel=silly
187
+ echo "::endgroup::"
188
+ echo "::group::install libxmljs2 "
178
189
## rebuild deps for which scripts were ignored, or partially installed - since "ignore-scripts" was used
179
190
npm rebuild --loglevel=silly libxmljs2 || npm uninstall --no-save libxmljs2
191
+ echo "::endgroup::"
192
+ echo "::group::install dev_requirements"
180
193
## install the needed dev-deps
181
- npm i --ignore-scripts --loglevel=silly --no-save $dev_requirements
194
+ npm i --workspaces=false --ignore-scripts --loglevel=silly --no-save $dev_requirements
195
+ echo "::endgroup::"
182
196
- name : fetch build artifact
183
197
# see https://github.com/actions/download-artifact
184
198
uses : actions/download-artifact@v4
@@ -225,7 +239,7 @@ jobs:
225
239
## dont install all the dev-packages, especially since some are not runnable on node 14.0.0
226
240
npm i --ignore-scripts --omit=optional --omit=dev --loglevel=silly
227
241
## install the needed dev-deps
228
- npm i --ignore-scripts --omit=optional --no-save --loglevel=silly mocha c8 npm-run-all fast-glob
242
+ npm i --ignore-scripts --omit=optional --no-save --loglevel=silly mocha c8 npm-run-all2 fast-glob
229
243
- name : fetch build artifact
230
244
# see https://github.com/actions/download-artifact
231
245
uses : actions/download-artifact@v4
@@ -281,6 +295,7 @@ jobs:
281
295
bash <(curl -Ls https://raw.githubusercontent.com/codacy/codacy-coverage-reporter/master/get.sh) report $auth $reports --partial -l Javascript &&\
282
296
bash <(curl -Ls https://raw.githubusercontent.com/codacy/codacy-coverage-reporter/master/get.sh) final $auth
283
297
298
+
284
299
examples-JS :
285
300
needs : [ 'build' ]
286
301
name : example JS ${{ matrix.js-type }}
@@ -440,6 +455,11 @@ jobs:
440
455
# cache: "npm"
441
456
# cache-dependency-path: "**/package-lock.json"
442
457
- name : setup project
443
- run : npm i --ignore-scripts --loglevel=silly
458
+ run : >
459
+ npm install
460
+ --ignore-scripts --loglevel=silly
461
+ -w tools/docs-gen --include-workspace-root
444
462
- name : api-doc ${{ matrix.target }}
445
- run : npm run api-doc:${{ matrix.target }}
463
+ run : >
464
+ npm run -w tools/docs-gen
465
+ api-doc:${{ matrix.target }}
0 commit comments