-
-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (47 loc) · 1.63 KB
/
Copy pathcodecov.yml
File metadata and controls
52 lines (47 loc) · 1.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# Codecov Coverage Upload for Python Libs
# Uploads test coverage reports to Codecov after CI workflow completion.
#
# This is a thin caller to the org-level reusable workflow.
# Security: Downloads artifacts only, no source checkout.
#
# Documentation: https://docs.codecov.com/
name: Codecov Upload
on:
# Trigger after CI workflow completes
workflow_run:
workflows: ["CI"]
types: [completed]
branches: [main, master, develop]
permissions:
contents: read
actions: read
jobs:
codecov:
name: Upload Coverage
# Only run on successful CI completion
if: ${{ github.event.workflow_run.conclusion == 'success' }}
uses: ByronWilliamsCPA/.github/.github/workflows/python-codecov.yml@987d517d3c8e4b180f4dd15de6d9575f0df91182 # main
with:
artifact-name: 'coverage-reports'
coverage-files: '*.xml'
name: 'Python Libs Coverage'
workflow-run-id: ${{ github.event.workflow_run.id }}
commit-sha: ${{ github.event.workflow_run.head_sha }}
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
report-failure:
name: Report CI Failure
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
permissions:
contents: read
steps:
- name: Harden the runner
uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
with:
egress-policy: audit
- name: Report status
run: |
echo "## Coverage Upload Skipped" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "⚠️ CI workflow failed - coverage upload skipped" >> $GITHUB_STEP_SUMMARY