2024-01-27 23:32:42 +01:00
|
|
|
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
|
|
|
|
|
2022-03-14 13:51:27 +05:30
|
|
|
name: Codecov
|
|
|
|
|
2023-06-30 13:44:57 +02:00
|
|
|
permissions: {}
|
|
|
|
|
2022-03-14 13:51:27 +05:30
|
|
|
on:
|
2025-02-18 18:47:26 +01:00
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
- release-*
|
2022-03-14 13:51:27 +05:30
|
|
|
pull_request:
|
|
|
|
branches:
|
2025-02-18 18:47:26 +01:00
|
|
|
- "main"
|
|
|
|
- "release*"
|
2022-03-14 13:51:27 +05:30
|
|
|
|
2023-01-06 16:24:55 +01:00
|
|
|
concurrency:
|
|
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
|
|
cancel-in-progress: true
|
|
|
|
|
2022-03-14 13:51:27 +05:30
|
|
|
jobs:
|
2024-02-18 01:10:30 +01:00
|
|
|
unit-tests:
|
2023-01-02 21:51:18 +01:00
|
|
|
runs-on: ubuntu-latest
|
2022-03-14 13:51:27 +05:30
|
|
|
steps:
|
2025-02-18 18:47:26 +01:00
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
|
|
- name: Setup caches
|
|
|
|
uses: ./.github/actions/setup-caches
|
|
|
|
timeout-minutes: 5
|
|
|
|
continue-on-error: true
|
|
|
|
with:
|
|
|
|
build-cache-key: codecov
|
|
|
|
- name: Setup build env
|
|
|
|
uses: ./.github/actions/setup-build-env
|
|
|
|
timeout-minutes: 10
|
|
|
|
with:
|
|
|
|
free-disk-space: false
|
|
|
|
- name: Generate Code Coverage Report
|
|
|
|
run: make code-cov-report
|
|
|
|
- name: Upload coverage
|
2025-03-10 07:52:30 +00:00
|
|
|
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1
|
2025-02-18 18:47:26 +01:00
|
|
|
with:
|
|
|
|
name: coverage.out
|
|
|
|
path: coverage.out
|
|
|
|
retention-days: 1
|
|
|
|
if-no-files-found: error
|
2024-02-18 01:10:30 +01:00
|
|
|
|
|
|
|
upload-to-codecov:
|
|
|
|
needs:
|
2025-02-18 18:47:26 +01:00
|
|
|
- unit-tests
|
2024-02-18 01:10:30 +01:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2025-02-18 18:47:26 +01:00
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
|
|
- name: Download coverage
|
2025-03-10 11:51:38 +00:00
|
|
|
uses: actions/download-artifact@cc203385981b70ca67e1cc392babf9cc229d5806 # v4.1.9
|
2025-02-18 18:47:26 +01:00
|
|
|
with:
|
|
|
|
name: coverage.out
|
|
|
|
- name: Upload Report to Codecov
|
2025-03-07 13:05:32 +00:00
|
|
|
uses: codecov/codecov-action@0565863a31f2c772f9f0395002a31e3f06189574 # v5.4.0
|
2025-02-18 18:47:26 +01:00
|
|
|
with:
|
|
|
|
files: ./coverage.out
|
|
|
|
fail_ci_if_error: true
|
|
|
|
verbose: true
|
|
|
|
env:
|
|
|
|
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|