cypress-plugin-last-failed 2.0.5 โ 2.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/main.yml +25 -0
- package/package.json +1 -1
- package/runFailed.js +9 -1
|
@@ -26,6 +26,31 @@ jobs:
|
|
|
26
26
|
# environment variable used for CI/CD tests in this repo
|
|
27
27
|
command: npx cypress-plugin-last-failed run --env shouldPass=true
|
|
28
28
|
working-directory: ${{ github.workspace }}
|
|
29
|
+
exit-code-check:
|
|
30
|
+
runs-on: ubuntu-22.04
|
|
31
|
+
steps:
|
|
32
|
+
- name: Checkout ๐ฆ
|
|
33
|
+
uses: actions/checkout@v4
|
|
34
|
+
- name: Cypress run ๐
|
|
35
|
+
uses: cypress-io/github-action@v6
|
|
36
|
+
continue-on-error: true
|
|
37
|
+
- name: Output the file contents ๐
|
|
38
|
+
if: always()
|
|
39
|
+
run: |
|
|
40
|
+
cat ./test-results/last-run.json
|
|
41
|
+
- name: Run failed tests from default directory ๐งช
|
|
42
|
+
id: run-failed
|
|
43
|
+
if: always()
|
|
44
|
+
continue-on-error: true
|
|
45
|
+
run: |
|
|
46
|
+
set +e
|
|
47
|
+
npx cypress-plugin-last-failed run
|
|
48
|
+
exitcode="$?"
|
|
49
|
+
echo "exitcode=$exitcode" >> $GITHUB_OUTPUT
|
|
50
|
+
- name: Output the runFailed node script exit code ๐
|
|
51
|
+
if: always()
|
|
52
|
+
run: |
|
|
53
|
+
echo ${{ steps.run-failed.outputs.exitcode }}
|
|
29
54
|
burn-test-results:
|
|
30
55
|
runs-on: ubuntu-22.04
|
|
31
56
|
steps:
|
package/package.json
CHANGED
package/runFailed.js
CHANGED
|
@@ -51,7 +51,15 @@ Try running tests again with cypress run`;
|
|
|
51
51
|
process.env.CYPRESS_grepFilterSpecs = true;
|
|
52
52
|
process.env.CYPRESS_grepOmitFiltered = true;
|
|
53
53
|
|
|
54
|
-
await cypress
|
|
54
|
+
await cypress
|
|
55
|
+
.run(runOptions)
|
|
56
|
+
.then((results) => {
|
|
57
|
+
process.exit(results.totalFailed);
|
|
58
|
+
})
|
|
59
|
+
.catch((err) => {
|
|
60
|
+
console.error(err);
|
|
61
|
+
process.exit(1);
|
|
62
|
+
});
|
|
55
63
|
} else {
|
|
56
64
|
console.log(noFailedTestsMessage);
|
|
57
65
|
}
|