diff --git a/dist/index.js b/dist/index.js index 19587c3a..df75f076 100644 --- a/dist/index.js +++ b/dist/index.js @@ -392,7 +392,7 @@ class TestReporter { const summary = (0, get_report_1.getReport)(results, { listSuites, listTests, baseUrl, onlySummary }); core.info('Creating annotations'); const annotations = (0, get_annotations_1.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 ? markdown_utils_1.Icon.fail : markdown_utils_1.Icon.success; core.info(`Updating check run conclusion (${conclusion}) and output`); diff --git a/package.json b/package.json index 6930c738..10b79a0c 100644 --- a/package.json +++ b/package.json @@ -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\"", diff --git a/src/main.ts b/src/main.ts index 156d9100..935c7697 100644 --- a/src/main.ts +++ b/src/main.ts @@ -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