From 0da52892f784b92ceabc91cda2df48e9b8d0bf2b Mon Sep 17 00:00:00 2001 From: Connor Vidlock Date: Mon, 20 Mar 2023 10:04:23 -0500 Subject: [PATCH] Update with reports to use --- .github/workflows/test-report.yml | 1 - jest-junit.xml | 81 +++++++++++++++++++++++++++++++ src/main.ts | 8 +-- 3 files changed, 85 insertions(+), 5 deletions(-) create mode 100644 jest-junit.xml diff --git a/.github/workflows/test-report.yml b/.github/workflows/test-report.yml index 8af3ade..a67047c 100644 --- a/.github/workflows/test-report.yml +++ b/.github/workflows/test-report.yml @@ -14,7 +14,6 @@ jobs: - uses: actions/checkout@v2 - uses: ./ with: - artifact: test-results name: Workflow Report path: '*.xml' reporter: jest-junit diff --git a/jest-junit.xml b/jest-junit.xml new file mode 100644 index 0000000..6ca8dc5 --- /dev/null +++ b/jest-junit.xml @@ -0,0 +1,81 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main.ts b/src/main.ts index e608411..4b9bcdb 100644 --- a/src/main.ts +++ b/src/main.ts @@ -42,7 +42,7 @@ class TestReporter { readonly failOnError = core.getInput('fail-on-error', {required: true}) === 'true' readonly workDirInput = core.getInput('working-directory', {required: false}) readonly onlySummary = core.getInput('only-summary', {required: false}) === 'true' - // readonly showHTMLNotice = core.getInput('show-html-notice', {required: false}) === 'true' + readonly showHTMLNotice = core.getInput('show-html-notice', {required: false}) === 'true' readonly token = core.getInput('token', {required: true}) readonly octokit: InstanceType readonly context = getCheckRunContext() @@ -199,9 +199,9 @@ class TestReporter { core.info(`Check run create response: ${resp.status}`) core.info(`Check run URL: ${resp.data.url}`) core.info(`Check run HTML: ${resp.data.html_url}`) - // if (this.showHTMLNotice) { - // console.log(`::notice title=Test Results::${resp.data.html_url}`) - // } + if (this.showHTMLNotice) { + console.log(`::notice title=Test Results::${resp.data.html_url}`) + } return results }