Skip to content

Commit

Permalink
chore: fix/test build dependencies (#1515)
Browse files Browse the repository at this point in the history
* chore: add dependency in nx (test depends on build)

Signed-off-by: Juan Munoz <juancho0202@gmail.com>

* chore: update build scripts to avoid unnecessary call to test script

Signed-off-by: Juan Munoz <juancho0202@gmail.com>

* ci: updated scripts and wildcards in test workflows

Signed-off-by: Juan Munoz <juancho0202@gmail.com>

---------

Signed-off-by: Juan Munoz <juancho0202@gmail.com>
  • Loading branch information
juancho0202 committed May 1, 2024
1 parent ba0d964 commit e25f0c5
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test-and-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
with:
node-version: "18.x"

- name: Install and Build OpenSCD
- name: Install and Test OpenSCD
run: |
npm clean-install
npm run-script build
npm run-script test
3 changes: 1 addition & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ on:
branches-ignore:
- main
paths:
- packages/open-scd/**
- packages/plugins/**
- packages/**

jobs:
test:
Expand Down
2 changes: 1 addition & 1 deletion nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
},
"test": {
"inputs": ["default", "^default"],
"dependsOn": ["^test"]
"dependsOn": ["^test", "build"]
},
"build": {
"dependsOn": ["clean", "^clean", "^build"]
Expand Down
3 changes: 1 addition & 2 deletions packages/open-scd/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,7 @@
"release:minor": "standard-version --release-as minor",
"release:patch": "standard-version --release-as patch",
"release:major": "standard-version --release-as major",
"build": "npm run test && npm run build:notest && cp .nojekyll build/",
"build:notest": "npm run doc && snowpack build && workbox generateSW workbox-config.cjs",
"build": "npm run doc && snowpack build && workbox generateSW workbox-config.cjs && cp .nojekyll build/",
"start": "snowpack dev"
},
"devDependencies": {
Expand Down
3 changes: 1 addition & 2 deletions packages/plugins/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,7 @@
"release:minor": "standard-version --release-as minor",
"release:patch": "standard-version --release-as patch",
"release:major": "standard-version --release-as major",
"build": "npm run test && npm run build:notest",
"build:notest": "npm run doc && npm run bundle",
"build": "npm run doc && npm run bundle",
"bundle": "tsc"
},
"devDependencies": {
Expand Down

0 comments on commit e25f0c5

Please sign in to comment.