Skip to content

Commit

Permalink
fix the package.json scripts and applied changes to the workflow
Browse files Browse the repository at this point in the history
Signed-off-by: instamenta <instamenta@abv.bg>
  • Loading branch information
instamenta committed Oct 9, 2024
1 parent efd0d6a commit 666762b
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 18 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/autogen/src/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,14 @@ function updatePackageJson (outputDir, config) {
const kebabCase = changeCase.kebabCase(formalNounName)

generatedLines.push(
`${spacePrefix}"test-e2e-${kebabCase}": "cross-env NODE_OPTIONS=--experimental-vm-modules ` +
`${spacePrefix}"test-e2e-${kebabCase}": "
cross-env NODE_OPTIONS=--experimental-vm-modules ` +
`MOCHA_GREP='E2E ${formalNounName} Tests' ` +
`nyc --reporter mocha-junit-reporter --reporter-options mochaFile=./junit-e2e-${kebabCase}.xml ` +
`--report-dir='coverage/e2e-${kebabCase}' --timeout 5000 ` +
`mocha --recursive 'test/e2e/**/*.mjs' --exit --coverage"`
);
`nyc --reporter=text --reporter=html --report-dir='coverage/e2e-${kebabCase}' ` +
`mocha --recursive --file 'test/setup.mjs' 'test/e2e/**/*.mjs' --exit ` +
`--reporter mocha-junit-reporter --reporter-options mochaFile=junit-e2e-${kebabCase}.xml ` +
`--check-leaks --timeout 5000 `
)
})

outputLines.push(...generatedLines)
Expand Down
26 changes: 13 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,19 @@
},
"scripts": {
"test": "cross-env NODE_OPTIONS=--experimental-vm-modules MOCHA_SUITE_NAME=\"Unit Tests\" nyc --reporter=text --reporter=html --report-dir='coverage/unit' mocha --recursive --file 'test/setup.mjs' 'test/unit/**/*.mjs' --exit --reporter mocha-junit-reporter --reporter-options mochaFile=junit.xml --check-leaks --timeout 20000",
"test-e2e-all": "NODE_OPTIONS=--experimental-vm-modules MOCHA_SUITE_NAME='Mocha E2E All Tests' nyc --reporter=text --reporter=html --report-dir='coverage/e2e' mocha --recursive --file 'test/setup.mjs' 'test/e2e/**/*.mjs' --exit --timeout 20000",
"test-e2e-standard": "NODE_OPTIONS=--experimental-vm-modules MOCHA_SUITE_NAME='Mocha E2E Standard Tests' nyc --reporter=text --reporter=html --report-dir='coverage/e2e-standard' mocha --recursive --file 'test/setup.mjs' 'test/e2e/**/*.mjs' --ignore 'test/unit/**/*.mjs' --ignore 'test/e2e/commands/mirror_node*.mjs' --ignore 'test/e2e/commands/node*.mjs' --ignore 'test/e2e/commands/separate_node*.mjs' --ignore 'test/e2e/commands/relay*.mjs' --exit --timeout 30000",
"test-e2e-mirror-node": "NODE_OPTIONS=--experimental-vm-modules MOCHA_SUITE_NAME='Mocha E2E Mirror Node Tests' nyc --reporter=text --reporter=html --report-dir='coverage/e2e-mirror-node' mocha --recursive --file 'test/setup.mjs' 'test/e2e/commands/mirror_node.test.mjs' --exit --timeout 20000",
"test-e2e-node-pem-stop": "NODE_OPTIONS=--experimental-vm-modules MOCHA_SUITE_NAME='Mocha E2E Node PEM Stop Tests' nyc --reporter=text --reporter=html --report-dir='coverage/e2e-node-pem-stop' mocha --recursive --file 'test/setup.mjs' 'test/e2e/commands/node_pem_stop.test.mjs' --exit --timeout 20000",
"test-e2e-node-pem-kill": "NODE_OPTIONS=--experimental-vm-modules MOCHA_SUITE_NAME='Mocha E2E Node PEM Kill Tests' nyc --reporter=text --reporter=html --report-dir='coverage/e2e-node-pem-kill' mocha --recursive --file 'test/setup.mjs' 'test/e2e/commands/node_pem_kill.test.mjs' --exit --timeout 20000",
"test-e2e-node-local-build": "NODE_OPTIONS=--experimental-vm-modules MOCHA_SUITE_NAME='Mocha E2E Node Local Build Tests' nyc --reporter=text --reporter=html --report-dir='coverage/e2e-node-local-build' mocha --recursive --file 'test/setup.mjs' 'test/e2e/commands/node_local*.test.mjs' --exit --timeout 20000",
"test-e2e-node-add": "NODE_OPTIONS=--experimental-vm-modules MOCHA_SUITE_NAME='Mocha E2E Node Add Tests' nyc --reporter=text --reporter=html --report-dir='coverage/e2e-node-add' mocha --recursive --file 'test/setup.mjs' 'test/e2e/commands/node_add*.test.mjs' --exit --timeout 20000",
"test-e2e-node-add-separate-commands": "NODE_OPTIONS=--experimental-vm-modules MOCHA_SUITE_NAME='Mocha E2E Node Add - Separate Commands Tests' nyc --reporter=text --reporter=html --report-dir='coverage/e2e-node-add-separate-commands' mocha --recursive --file 'test/setup.mjs' 'test/e2e/commands/separate_node_add*.test.mjs' --exit --timeout 20000",
"test-e2e-node-update": "NODE_OPTIONS=--experimental-vm-modules MOCHA_SUITE_NAME='Mocha E2E Node Update Tests' nyc --reporter=text --reporter=html --report-dir='coverage/e2e-node-update' mocha --recursive --file 'test/setup.mjs' 'test/e2e/commands/node_update*.test.mjs' --exit --timeout 20000",
"test-e2e-node-delete": "NODE_OPTIONS=--experimental-vm-modules MOCHA_SUITE_NAME='Mocha E2E Node Delete Tests' nyc --reporter=text --reporter=html --report-dir='coverage/e2e-node-delete' mocha --recursive --file 'test/setup.mjs' 'test/e2e/commands/node_delete*.test.mjs' --exit --timeout 20000",
"test-e2e-node-delete-separate-commands": "NODE_OPTIONS=--experimental-vm-modules MOCHA_SUITE_NAME='Mocha E2E Node Delete - Separate Commands Tests' nyc --reporter=text --reporter=html --report-dir='coverage/e2e-node-delete-separate-commands' mocha --recursive --file 'test/setup.mjs' 'test/e2e/commands/separate_node_delete*.test.mjs' --exit --timeout 20000",
"test-e2e-node-upgrade": "NODE_OPTIONS=--experimental-vm-modules MOCHA_SUITE_NAME='Mocha E2E Node Upgrade Tests' nyc --reporter=text --reporter=html --report-dir='coverage/e2e-node-upgrade' mocha --recursive --file 'test/setup.mjs' 'test/e2e/commands/node_upgrade*.test.mjs' --exit --timeout 20000",
"test-e2e-relay": "NODE_OPTIONS=--experimental-vm-modules MOCHA_SUITE_NAME='Mocha E2E Relay Tests' nyc --reporter=text --reporter=html --report-dir='coverage/e2e-relay' mocha --recursive --file 'test/setup.mjs' 'test/e2e/commands/relay.test.mjs' --exit --timeout 20000",
"test-e2e-all": "cross-env NODE_OPTIONS=--experimental-vm-modules MOCHA_SUITE_NAME=\"Mocha E2E All Tests\" nyc --reporter=text --reporter=html --report-dir='coverage/e2e-all' mocha --recursive --file 'test/setup.mjs' 'test/e2e/**/*.mjs' --exit --reporter mocha-junit-reporter --reporter-options mochaFile=junit-e2e-all.xml --check-leaks --timeout 20000",
"test-e2e-standard": "cross-env NODE_OPTIONS=--experimental-vm-modules MOCHA_SUITE_NAME=\"Mocha E2E Standard Tests\" nyc --reporter=text --reporter=html --report-dir='coverage/e2e-standard' mocha --recursive --file 'test/setup.mjs' 'test/e2e/**/*.mjs' --ignore 'test/unit/**/*.mjs' --ignore 'test/e2e/commands/mirror_node*.mjs' --ignore 'test/e2e/commands/node*.mjs' --ignore 'test/e2e/commands/separate_node*.mjs' --ignore 'test/e2e/commands/relay*.mjs' --exit --reporter mocha-junit-reporter --reporter-options mochaFile=junit-e2e-standard.xml --check-leaks --timeout 30000",
"test-e2e-mirror-node": "cross-env NODE_OPTIONS=--experimental-vm-modules MOCHA_SUITE_NAME=\"Mocha E2E Mirror Node Tests\" nyc --reporter=text --reporter=html --report-dir='coverage/e2e-mirror-node' mocha --recursive --file 'test/setup.mjs' 'test/e2e/commands/mirror_node.test.mjs' --exit --reporter mocha-junit-reporter --reporter-options mochaFile=junit-e2e-mirror-node.xml --check-leaks --timeout 20000",
"test-e2e-node-pem-stop": "cross-env NODE_OPTIONS=--experimental-vm-modules MOCHA_SUITE_NAME=\"Mocha E2E Node PEM Stop Tests\" nyc --reporter=text --reporter=html --report-dir='coverage/e2e-node-pem-stop' mocha --recursive --file 'test/setup.mjs' 'test/e2e/commands/node_pem_stop.test.mjs' --exit --reporter mocha-junit-reporter --reporter-options mochaFile=junit-node-pem-stop.xml --check-leaks --timeout 20000",
"test-e2e-node-pem-kill": "cross-env NODE_OPTIONS=--experimental-vm-modules MOCHA_SUITE_NAME=\"Mocha E2E Node PEM Kill Tests\" nyc --reporter=text --reporter=html --report-dir='coverage/e2e-node-pem-kill' mocha --recursive --file 'test/setup.mjs' 'test/e2e/commands/node_pem_kill.test.mjs' --exit --reporter mocha-junit-reporter --reporter-options mochaFile=junit-node-pem-kill.xml --check-leaks --timeout 20000",
"test-e2e-node-local-build": "cross-env NODE_OPTIONS=--experimental-vm-modules MOCHA_SUITE_NAME=\"Mocha E2E Node Local Build Tests\" nyc --reporter=text --reporter=html --report-dir='coverage/e2e-node-local-build' mocha --recursive --file 'test/setup.mjs' 'test/e2e/commands/node_local*.test.mjs' --exit --reporter mocha-junit-reporter --reporter-options mochaFile=junit-e2e-node-local-build.xml --check-leaks --timeout 20000",
"test-e2e-node-add": "cross-env NODE_OPTIONS=--experimental-vm-modules MOCHA_SUITE_NAME=\"Mocha E2E Node Add Tests\" nyc --reporter=text --reporter=html --report-dir='coverage/e2e-node-add' mocha --recursive --file 'test/setup.mjs' 'test/e2e/commands/node_add*.test.mjs' --exit --reporter mocha-junit-reporter --reporter-options mochaFile=junit-e2e-node-add.xml --check-leaks --timeout 20000",
"test-e2e-node-add-separate-commands": "cross-env NODE_OPTIONS=--experimental-vm-modules MOCHA_SUITE_NAME=\"Mocha E2E Node Add - Separate Commands Tests\" nyc --reporter=text --reporter=html --report-dir='coverage/e2e-node-add-separate-commands' mocha --recursive --file 'test/setup.mjs' 'test/e2e/commands/separate_node_add*.test.mjs' --exit --reporter mocha-junit-reporter --reporter-options mochaFile=junit-e2e-node-add-separate-commands.xml --check-leaks --timeout 20000",
"test-e2e-node-update": "cross-env NODE_OPTIONS=--experimental-vm-modules MOCHA_SUITE_NAME=\"Mocha E2E Node Update Tests\" nyc --reporter=text --reporter=html --report-dir='coverage/e2e-node-update' mocha --recursive --file 'test/setup.mjs' 'test/e2e/commands/node_update*.test.mjs' --exit --reporter mocha-junit-reporter --reporter-options mochaFile=junit-e2e-node-update.xml --check-leaks --timeout 20000",
"test-e2e-node-delete": "cross-env NODE_OPTIONS=--experimental-vm-modules MOCHA_SUITE_NAME=\"Mocha E2E Node Delete Tests\" nyc --reporter=text --reporter=html --report-dir='coverage/e2e-node-delete' mocha --recursive --file 'test/setup.mjs' 'test/e2e/commands/node_delete*.test.mjs' --exit --reporter mocha-junit-reporter --reporter-options mochaFile=junit-e2e-node-delete.xml --check-leaks --timeout 20000",
"test-e2e-node-delete-separate-commands": "cross-env NODE_OPTIONS=--experimental-vm-modules MOCHA_SUITE_NAME=\"Mocha E2E Node Delete - Separate Commands Tests\" nyc --reporter=text --reporter=html --report-dir='coverage/e2e-node-delete-separate-commands' mocha --recursive --file 'test/setup.mjs' 'test/e2e/commands/separate_node_delete*.test.mjs' --exit --reporter mocha-junit-reporter --reporter-options mochaFile=junit-e2e-node-delete-separate-commands.xml --check-leaks --timeout 20000",
"test-e2e-node-upgrade": "cross-env NODE_OPTIONS=--experimental-vm-modules MOCHA_SUITE_NAME=\"Mocha E2E Node Upgrade Tests\" nyc --reporter=text --reporter=html --report-dir='coverage/e2e-node-upgrade' mocha --recursive --file 'test/setup.mjs' 'test/e2e/commands/node_upgrade*.test.mjs' --exit --reporter mocha-junit-reporter --reporter-options mochaFile=junit-e2e-node-upgrade.xml --check-leaks --timeout 20000",
"test-e2e-relay": "cross-env NODE_OPTIONS=--experimental-vm-modules MOCHA_SUITE_NAME=\"Mocha E2E Relay Tests\" nyc --reporter=text --reporter=html --report-dir='coverage/e2e-relay' mocha --recursive --file 'test/setup.mjs' 'test/e2e/commands/relay.test.mjs' --exit --reporter mocha-junit-reporter --reporter-options mochaFile=junit-e2e-relay.xml --check-leaks --timeout 20000",
"merge-clean": "rm -rf .nyc_output && mkdir .nyc_output && rm -rf coverage/lcov-report && rm -rf coverage/solo && rm coverage/*.*",
"merge-e2e": "nyc merge ./coverage/e2e/ .nyc_output/coverage.json",
"merge-unit": "nyc merge ./coverage/unit/ .nyc_output/coverage.json",
Expand Down

0 comments on commit 666762b

Please sign in to comment.