Added input parameter to the template and documented in the README.

This commit is contained in:
Patrick Lehmann
2021-12-07 20:09:11 +01:00
parent 40856aa731
commit 774ea7970e
3 changed files with 11 additions and 1 deletions

View File

@@ -24,6 +24,12 @@ name: Publish Unit Test Results
on: on:
workflow_call: workflow_call:
inputs:
report_files:
description: 'Pattern of report files to upload. Can be a comma separated list.'
required: false
default: 'artifacts/**/*.xml'
type: string
jobs: jobs:
PublishTestResults: PublishTestResults:
@@ -44,5 +50,5 @@ jobs:
uses: dorny/test-reporter@v1 uses: dorny/test-reporter@v1
with: with:
name: Unit Test Results name: Unit Test Results
path: artifacts/**/*.xml path: ${{ inputs.report_files }}
reporter: java-junit reporter: java-junit

View File

@@ -53,6 +53,9 @@ jobs:
uses: pyTooling/Actions/.github/workflows/PublishTestResults.yml@main uses: pyTooling/Actions/.github/workflows/PublishTestResults.yml@main
needs: needs:
- UnitTesting - UnitTesting
with:
# Optional
report_files: artifacts/**/*.xml
Package: Package:
uses: pyTooling/Actions/.github/workflows/Package.yml@main uses: pyTooling/Actions/.github/workflows/Package.yml@main

View File

@@ -126,6 +126,7 @@ As shown in the screenshot above, the expected order is:
- [Release](.github/workflows/Release.yml): publish GitHub Release. - [Release](.github/workflows/Release.yml): publish GitHub Release.
- [Package](.github/workflows/Package.yml): generate source and wheel packages, and upload them as an artifact. - [Package](.github/workflows/Package.yml): generate source and wheel packages, and upload them as an artifact.
- [PublishOnPyPI](.github/workflows/PublishOnPyPI.yml): publish source and wheel packages to PyPI. - [PublishOnPyPI](.github/workflows/PublishOnPyPI.yml): publish source and wheel packages to PyPI.
- [PublishTestResults](.github/workflows/PublishTestResults.yml): publish unit test results through GH action `dorny/test-reporter`.
- Documentation: - Documentation:
- [BuildTheDocs](.github/workflows/BuildTheDocs.yml): build Sphinx documentation with BuildTheDocs, and upload HTML as - [BuildTheDocs](.github/workflows/BuildTheDocs.yml): build Sphinx documentation with BuildTheDocs, and upload HTML as
an artifact. an artifact.