Skip to content

Commit 09778d7

Browse files
committed
wip
Signed-off-by: Jan Kowalleck <[email protected]>
1 parent 39c3914 commit 09778d7

File tree

6 files changed

+43
-11
lines changed

6 files changed

+43
-11
lines changed

.github/workflows/nodejs.yml

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,10 +120,10 @@ jobs:
120120
- name: setup tools
121121
run: |
122122
echo "::group::install docs-gen deps"
123-
npm run -- dev-setup:docs-gen --ignore-scripts --loglevel=silly
123+
npm run -- dev-setup:tools:docs-gen --ignore-scripts --loglevel=silly
124124
echo "::endgroup::"
125125
echo "::group::install code-style deps"
126-
npm run -- dev-setup:code-style --ignore-scripts --loglevel=silly
126+
npm run -- dev-setup:tools:code-style --ignore-scripts --loglevel=silly
127127
echo "::endgroup::"
128128
- name: make reports dir
129129
run: mkdir -p "$REPORTS_DIR"
@@ -147,6 +147,35 @@ jobs:
147147
path: ${{ env.REPORTS_DIR }}
148148
if-no-files-found: error
149149

150+
test-dependencies:
151+
needs: [ 'build' ]
152+
name: test dependencies
153+
runs-on: ubuntu-latest
154+
timeout-minutes: 10
155+
steps:
156+
- name: Checkout
157+
# see https://github.com/actions/checkout
158+
uses: actions/checkout@v4
159+
- name: fetch build artifact
160+
# see https://github.com/actions/download-artifact
161+
uses: actions/download-artifact@v4
162+
with:
163+
name: dist.d
164+
path: dist.d
165+
- name: Setup Node.js ${{ env.NODE_ACTIVE_LTS }}
166+
# see https://github.com/actions/setup-node
167+
uses: actions/setup-node@v4
168+
with:
169+
node-version: ${{ env.NODE_ACTIVE_LTS }}
170+
# cache: "npm"
171+
# cache-dependency-path: "**/package-lock.json"
172+
- name: setup project
173+
run: npm install --ignore-scripts --loglevel=silly
174+
- name: setup tool
175+
run: npm run -- dev-setup:tools:test-dependencies --ignore-scripts --loglevel=silly
176+
- name: test
177+
run: npm run -- test:dependencies -d
178+
150179
test-node:
151180
needs: [ 'build' ]
152181
name: test node (${{ matrix.node-version }}, ${{ matrix.os }})
@@ -483,7 +512,7 @@ jobs:
483512
npm install --ignore-scripts --loglevel=silly
484513
echo "::endgroup::"
485514
echo "::group::install docs-gen deps"
486-
npm run -- dev-setup:docs-gen --ignore-scripts --loglevel=silly
515+
npm run -- dev-setup:tools:docs-gen --ignore-scripts --loglevel=silly
487516
echo "::endgroup::"
488517
- name: api-doc ${{ matrix.target }}
489518
run: npm run api-doc:${{ matrix.target }}

.github/workflows/release.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,10 +120,13 @@ jobs:
120120
- name: setup tools
121121
run: |
122122
echo "::group::install docs-gen deps"
123-
npm run -- dev-setup:docs-gen --ignore-scripts --loglevel=silly
123+
npm run -- dev-setup:tools:docs-gen --ignore-scripts --loglevel=silly
124124
echo "::endgroup::"
125125
echo "::group::install code-style deps"
126-
npm run -- dev-setup:code-style --ignore-scripts --loglevel=silly
126+
npm run -- dev-setup:tools:code-style --ignore-scripts --loglevel=silly
127+
echo "::endgroup::"
128+
echo "::group::install test-dependencies deps"
129+
npm run -- dev-setup:tools:test-dependencies --ignore-scripts --loglevel=silly
127130
echo "::endgroup::"
128131
# no explicit npm build. if a build is required, it should be configured as prepublish/prepublishOnly script of npm.
129132
- name: login to registries

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -170,10 +170,10 @@
170170
},
171171
"scripts": {
172172
"dev-setup": "npm i && run-p --aggregate-output -lc dev-setup:\\*",
173-
"dev-setup:tools": "run-p --aggregate-output -lc dev-setup:tool:\\*",
174-
"dev-setup:tool:docs-gen": "npm --prefix tools/docs-gen install",
175-
"dev-setup:tool:code-style": "npm --prefix tools/code-style install",
176-
"dev-setup:tool:test-dependnecies": "npm --prefix tools/test-dependnecies install",
173+
"dev-setup:tools": "run-p --aggregate-output -lc dev-setup:tools:\\*",
174+
"dev-setup:tools:docs-gen": "npm --prefix tools/docs-gen install",
175+
"dev-setup:tools:code-style": "npm --prefix tools/code-style install",
176+
"dev-setup:tools:test-dependencies": "npm --prefix tools/test-dependencies install",
177177
"dev-setup:examples": "run-p --aggregate-output -lc dev-setup:examples:\\*",
178178
"dev-setup:examples:js": "npm --prefix examples/node/javascript i --ignore-scripts",
179179
"dev-setup:examples:ts-cjs": "npm --prefix examples/node/typescript/example.cjs i --ignore-scripts",
@@ -192,7 +192,7 @@
192192
"test:web": "node -e 'console.log(\"TODO: write web test\")'",
193193
"test:lint": "tsc --noEmit",
194194
"test:standard": "npm --prefix tools/code-style exec -- eslint .",
195-
"test:dependencies": "npm --prefix tools/test-dependnecies exec -- knip --include dependencies,unlisted,unresolved --production -d",
195+
"test:dependencies": "npm --prefix tools/test-dependencies exec -- knip --include dependencies,unlisted,unresolved --production",
196196
"cs-fix": "npm --prefix tools/code-style exec -- eslint --fix .",
197197
"api-doc": "run-p --aggregate-output -lc api-doc:\\*",
198198
"api-doc:node": "npm --prefix tools/docs-gen exec -- typedoc --options ./typedoc.node.json",
File renamed without changes.
File renamed without changes.

tools/test-dependnecies/package.json renamed to tools/test-dependencies/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"private": true,
3-
"name": "@cyclonedx/cyclonedx-javascript-library/tools/test-dependnecies",
3+
"name": "@cyclonedx/cyclonedx-javascript-library/tools/test-dependencies",
44
"license": "Apache-2.0",
55
"engines": {
66
"node": ">=20.18"

0 commit comments

Comments
 (0)