diff --git a/action.yml b/action.yml index d1a73fb..2de6f04 100644 --- a/action.yml +++ b/action.yml @@ -10,8 +10,12 @@ inputs: required: true numFailures: description: 'max number of failed tests to include' - require: true - default: 30 + required: false + default: "30" + reportTitle: + description: "Report title" + required: false + default: "Test Report" runs: using: 'node12' main: 'dist/index.js' diff --git a/src/main.ts b/src/main.ts index 1287602..027ee7c 100644 --- a/src/main.ts +++ b/src/main.ts @@ -11,6 +11,7 @@ async function run(): Promise { const path = getInput('path') const numFailures = parseInt(getInput('numFailures')) const accessToken = getInput('access-token') + const title = getInput('reportTitle') const results = await readResults(path) @@ -49,7 +50,7 @@ async function run(): Promise { status: 'completed', conclusion: results.failed > 0 || results.passed === 0 ? 'failure' : 'success', output: { - title: 'Test Report', + title, summary, annotations: results.annotations.slice(0, numFailures), text: details