mirror of
https://github.com/dorny/test-reporter.git
synced 2025-12-17 23:07:08 +01:00
add new action-run-number to reporter
This commit is contained in:
parent
ffc3bcb887
commit
09905229df
3 changed files with 10 additions and 1 deletions
|
|
@ -185,6 +185,9 @@ jobs:
|
||||||
# Defaults to false
|
# Defaults to false
|
||||||
show-html-notice: 'true'
|
show-html-notice: 'true'
|
||||||
|
|
||||||
|
# Allows for passing through calling actions run number and attempt. When running reruns, its hard to differentiate runs.
|
||||||
|
action-run-number: ''
|
||||||
|
|
||||||
# Personal access token used to interact with Github API
|
# Personal access token used to interact with Github API
|
||||||
# Default: ${{ github.token }}
|
# Default: ${{ github.token }}
|
||||||
token: ''
|
token: ''
|
||||||
|
|
|
||||||
|
|
@ -69,6 +69,11 @@ inputs:
|
||||||
description: Show the link to the html results in the form of a notice on the summary page. This was created to combat a GHA bug of not always displaying the results in the right action.
|
description: Show the link to the html results in the form of a notice on the summary page. This was created to combat a GHA bug of not always displaying the results in the right action.
|
||||||
required: false
|
required: false
|
||||||
default: 'false'
|
default: 'false'
|
||||||
|
action-run-number:
|
||||||
|
description: |
|
||||||
|
The run number of the action that generated the test results. Passed in through calling action into reporter
|
||||||
|
required: false
|
||||||
|
default: ''
|
||||||
only-summary:
|
only-summary:
|
||||||
description: |
|
description: |
|
||||||
Allows you to generate only the summary.
|
Allows you to generate only the summary.
|
||||||
|
|
|
||||||
|
|
@ -47,6 +47,7 @@ class TestReporter {
|
||||||
readonly workDirInput = core.getInput('working-directory', {required: false})
|
readonly workDirInput = core.getInput('working-directory', {required: false})
|
||||||
readonly onlySummary = core.getInput('only-summary', {required: false}) === 'true'
|
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 actionRunNumber = core.getInput('action-run-number', {required: false})
|
||||||
readonly token = core.getInput('token', {required: true})
|
readonly token = core.getInput('token', {required: true})
|
||||||
readonly octokit: InstanceType<typeof GitHub>
|
readonly octokit: InstanceType<typeof GitHub>
|
||||||
readonly context = getCheckRunContext()
|
readonly context = getCheckRunContext()
|
||||||
|
|
@ -226,7 +227,7 @@ class TestReporter {
|
||||||
core.info('*** showhtmlnotice set to true')
|
core.info('*** showhtmlnotice set to true')
|
||||||
core.exportVariable('TEST_RESULTS_URL', `${resp.data.html_url}`)
|
core.exportVariable('TEST_RESULTS_URL', `${resp.data.html_url}`)
|
||||||
core.info(`Set env var to: ${process.env.TEST_RESULTS_URL}`)
|
core.info(`Set env var to: ${process.env.TEST_RESULTS_URL}`)
|
||||||
core.info(`::notice title=Test Results::${resp.data.html_url}`)
|
core.info(`::notice title=Test Results ${this.actionRunNumber}::${resp.data.html_url}`)
|
||||||
}
|
}
|
||||||
core.setOutput('url', resp.data.url)
|
core.setOutput('url', resp.data.url)
|
||||||
core.setOutput('url_html', resp.data.html_url)
|
core.setOutput('url_html', resp.data.html_url)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue