7575 # cache: "npm"
7676 # cache-dependency-path: "**/package-lock.json"
7777 - name : setup project
78- run : npm i --ignore-scripts --include=optional --loglevel=silly
78+ run : npm i --ignore-scripts --include=optional --loglevel=silly
7979 - name : test
8080 run : npm run test:lint
8181
@@ -95,13 +95,16 @@ jobs:
9595 # cache: "npm"
9696 # cache-dependency-path: "**/package-lock.json"
9797 - 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
99102 - name : make reports dir
100103 run : mkdir -p "$REPORTS_DIR"
101104 - name : test
102105 run : >
103106 npm run --
104- test:standard
107+ test:standard --
105108 --format checkstyle
106109 --output-file "$REPORTS_DIR/eslint.xml"
107110 - name : Publish Checkstyle report
@@ -157,28 +160,39 @@ jobs:
157160 run : |
158161 set -ex
159162 dep_constraints=''
160- dev_requirements='c8 mocha npm-run-all fast-glob'
163+ dev_requirements=' c8 mocha npm-run-all2 fast-glob '
161164 # as long as npm cannot auto-resolve engine-constraints, we need to help here
162165 case "$NODE_VERSION" in
163166 '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 }"
167172 ;;
168173 '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 }"
170176 ;;
171177 esac
178+ echo "::group::install dep_constraints"
172179 ## !! dont install all the dev-packages, especially since some are not runnable on node 14.0.0
173180 if [[ -n "$dep_constraints" ]]
174181 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
176183 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 "
178189 ## rebuild deps for which scripts were ignored, or partially installed - since "ignore-scripts" was used
179190 npm rebuild --loglevel=silly libxmljs2 || npm uninstall --no-save libxmljs2
191+ echo "::endgroup::"
192+ echo "::group::install dev_requirements"
180193 ## 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::"
182196 - name : fetch build artifact
183197 # see https://github.com/actions/download-artifact
184198 uses : actions/download-artifact@v4
@@ -225,7 +239,7 @@ jobs:
225239 ## dont install all the dev-packages, especially since some are not runnable on node 14.0.0
226240 npm i --ignore-scripts --omit=optional --omit=dev --loglevel=silly
227241 ## 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
229243 - name : fetch build artifact
230244 # see https://github.com/actions/download-artifact
231245 uses : actions/download-artifact@v4
@@ -281,6 +295,7 @@ jobs:
281295 bash <(curl -Ls https://raw.githubusercontent.com/codacy/codacy-coverage-reporter/master/get.sh) report $auth $reports --partial -l Javascript &&\
282296 bash <(curl -Ls https://raw.githubusercontent.com/codacy/codacy-coverage-reporter/master/get.sh) final $auth
283297
298+
284299 examples-JS :
285300 needs : [ 'build' ]
286301 name : example JS ${{ matrix.js-type }}
@@ -440,6 +455,11 @@ jobs:
440455 # cache: "npm"
441456 # cache-dependency-path: "**/package-lock.json"
442457 - 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
444462 - 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