Skip to content

Commit

Permalink
Merge pull request #214 from trond-snekvik/fail-on-error
Browse files Browse the repository at this point in the history
Only report failure if fail-on-error is set
  • Loading branch information
dorny committed Nov 30, 2022
2 parents 8bf0c7d + 0042016 commit 75b0cad
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"format": "prettier --write **/*.ts",
"format-check": "prettier --check **/*.ts",
"lint": "eslint src/**/*.ts",
"package": "ncc build --license licenses.txt && eolConverter lf dist/*",
"package": "ncc build --license licenses.txt && eolConverter lf 'dist/*'",
"test": "jest --ci --reporters=default --reporters=jest-junit",
"all": "npm run build && npm run format && npm run lint && npm run package && npm test",
"dart-fixture": "cd \"reports/dart\" && dart test --file-reporter=\"json:../../__tests__/fixtures/dart-json.json\"",
Expand Down
2 changes: 1 addition & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ class TestReporter {
core.info('Creating annotations')
const annotations = getAnnotations(results, this.maxAnnotations)

const isFailed = results.some(tr => tr.result === 'failed')
const isFailed = this.failOnError && results.some(tr => tr.result === 'failed')
const conclusion = isFailed ? 'failure' : 'success'
const icon = isFailed ? Icon.fail : Icon.success

Expand Down

0 comments on commit 75b0cad

Please sign in to comment.