mirror of
https://github.com/pyTooling/Actions.git
synced 2026-02-12 02:56:56 +08:00
Generate error messages if codecov or codacy fail.
This commit is contained in:
13
.github/workflows/PublishTestResults.yml
vendored
13
.github/workflows/PublishTestResults.yml
vendored
@@ -74,6 +74,11 @@ on:
|
||||
required: false
|
||||
default: true
|
||||
type: boolean
|
||||
codecov_flags:
|
||||
description: 'Flags applied to the upload to Codecov'
|
||||
required: false
|
||||
default: 'unittest'
|
||||
type: string
|
||||
secrets:
|
||||
CODECOV_TOKEN:
|
||||
description: 'Token to push result to Codecov.'
|
||||
@@ -125,13 +130,21 @@ jobs:
|
||||
|
||||
- name: 📊 Publish unittest results at CodeCov
|
||||
uses: codecov/test-results-action@v1
|
||||
id: codecov
|
||||
if: inputs.codecov
|
||||
with:
|
||||
token: ${{ secrets.CODECOV_TOKEN }}
|
||||
disable_search: true
|
||||
files: ${{ inputs.merged_junit_filename }}
|
||||
flags: ${{ inputs.codecov_flags }}
|
||||
fail_ci_if_error: true
|
||||
|
||||
- name: Generate error messages
|
||||
run: |
|
||||
if [[ "${{ steps.codecov.outcome }}" == "failure" ]]; then
|
||||
printf "::error title=%s::%s\n" "Codecov" "Failed to publish unittest results."
|
||||
fi
|
||||
|
||||
- name: 📤 Upload merged 'JUnit Test Summary' artifact
|
||||
uses: pyTooling/upload-artifact@v4
|
||||
if: inputs.merged_junit_artifact != ''
|
||||
|
||||
Reference in New Issue
Block a user