Skip to content

Commit

Permalink
test: the ci job should be failed when the test fail
Browse files Browse the repository at this point in the history
  • Loading branch information
hung-cybo committed Jun 7, 2024
1 parent a1baa36 commit 2ca18dd
Showing 1 changed file with 19 additions and 13 deletions.
32 changes: 19 additions & 13 deletions scripts/run-e2e-in-parallel.mjs
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
import runAll from "npm-run-all";
import { globSync } from "glob";
import path from "path";
// import { globSync } from "glob";
// import path from "path";

const featuresPath = path.posix.join(
"features",
"**",
"*.{feature,feature.md}",
);
const featureFiles = globSync(featuresPath, { posix: true });
// const featuresPath = path.posix.join(
// "features",
// "**",
// "*.{feature,feature.md}",
// );
// const featureFiles = globSync(featuresPath, { posix: true });

const patterns = [];
featureFiles.forEach((file) => {
patterns.push(
`test:e2e ${file} --format ./cucumber-reporter.js:./allure-results/dummy.txt`,
);
});
patterns.push(
`test:e2e features/delete.feature:55 --format ./cucumber-reporter.js:./allure-results/dummy.txt`,
);
// featureFiles.forEach((file) => {
// patterns.push(
// `test:e2e features/delete.feature:55 --format ./cucumber-reporter.js:./allure-results/dummy.txt`,
// );
// });

runAll(patterns, {
parallel: true,
Expand All @@ -33,4 +36,7 @@ runAll(patterns, {
} else {
console.error(error);
}

// eslint-disable-next-line no-process-exit
process.exit(1);
});

0 comments on commit 2ca18dd

Please sign in to comment.