| 1 |
--- |
| 2 |
name: Publish coverage to CodeCov |
| 3 |
on: |
| 4 |
workflow_call: |
| 5 |
jobs: |
| 6 |
codecov: |
| 7 |
name: Upload to CodeCov. |
| 8 |
if: github.repository == 'aristanetworks/anta' |
| 9 |
runs-on: ubuntu-latest |
| 10 |
|
| 11 |
permissions: |
| 12 |
id-token: write |
| 13 |
contents: read |
| 14 |
steps: |
| 15 |
- name: Checkout Code |
| 16 |
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 |
| 17 |
with: |
| 18 |
persist-credentials: false |
| 19 |
|
| 20 |
- name: Download coverage from unit tests |
| 21 |
continue-on-error: true |
| 22 |
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c |
| 23 |
with: |
| 24 |
name: pytest-coverage |
| 25 |
|
| 26 |
- name: Upload results to Codecov |
| 27 |
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f |
| 28 |
with: |
| 29 |
use_oidc: true |
| 30 |
fail_ci_if_error: true |