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:
11
.github/workflows/PublishCoverageResults.yml
vendored
11
.github/workflows/PublishCoverageResults.yml
vendored
@@ -200,6 +200,7 @@ jobs:
|
||||
|
||||
- name: 📊 Publish code coverage at CodeCov
|
||||
uses: codecov/codecov-action@v5
|
||||
id: codecov
|
||||
if: inputs.codecov
|
||||
continue-on-error: true
|
||||
with:
|
||||
@@ -212,8 +213,18 @@ jobs:
|
||||
|
||||
- name: 📉 Publish code coverage at Codacy
|
||||
uses: codacy/codacy-coverage-reporter-action@v1
|
||||
id: codacy
|
||||
if: inputs.codacy
|
||||
continue-on-error: true
|
||||
with:
|
||||
project-token: ${{ secrets.CODACY_TOKEN }}
|
||||
coverage-reports: ${{ inputs.coverage_report_xml_directory }}/${{ inputs.coverage_report_xml_filename }}
|
||||
|
||||
- name: Generate error messages
|
||||
run: |
|
||||
if [[ "${{ steps.codecov.outcome }}" == "failure" ]]; then
|
||||
printf "::error title=%s::%s\n" "Codecov" "Failed to publish code coverage results."
|
||||
fi
|
||||
if [[ "${{ steps.codacy.outcome }}" == "failure" ]]; then
|
||||
printf "::error title=%s::%s\n" "Codacy" "Failed to publish code coverage results."
|
||||
fi
|
||||
|
||||
1
.github/workflows/PublishOnPyPI.yml
vendored
1
.github/workflows/PublishOnPyPI.yml
vendored
@@ -50,7 +50,6 @@ on:
|
||||
required: false
|
||||
|
||||
jobs:
|
||||
|
||||
PublishOnPyPI:
|
||||
name: 🚀 Publish to PyPI
|
||||
runs-on: "ubuntu-${{ inputs.ubuntu_image_version }}"
|
||||
|
||||
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 != ''
|
||||
|
||||
@@ -10,4 +10,4 @@ pytest-cov ~= 6.1
|
||||
# Static Type Checking
|
||||
mypy ~= 1.15
|
||||
typing_extensions ~= 4.13
|
||||
lxml ~= 5.3
|
||||
lxml ~= 5.4
|
||||
|
||||
Reference in New Issue
Block a user