2024-01-27 22:32:42 +00:00
|
|
|
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
|
|
|
|
|
2022-03-14 08:21:27 +00:00
|
|
|
name: Codecov
|
|
|
|
|
2023-06-30 11:44:57 +00:00
|
|
|
permissions: {}
|
|
|
|
|
2022-03-14 08:21:27 +00:00
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
branches:
|
2024-02-18 00:10:30 +00:00
|
|
|
- 'main'
|
|
|
|
- 'release*'
|
2022-03-14 08:21:27 +00:00
|
|
|
|
2023-01-06 15:24:55 +00:00
|
|
|
concurrency:
|
|
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
|
|
cancel-in-progress: true
|
|
|
|
|
2022-03-14 08:21:27 +00:00
|
|
|
jobs:
|
2024-02-18 00:10:30 +00:00
|
|
|
unit-tests:
|
2023-01-02 20:51:18 +00:00
|
|
|
runs-on: ubuntu-latest
|
2022-03-14 08:21:27 +00:00
|
|
|
steps:
|
2024-02-18 00:10:30 +00:00
|
|
|
- name: Checkout
|
2024-10-24 09:42:17 +00:00
|
|
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
2024-02-18 00:10:30 +00:00
|
|
|
- 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
|
2024-10-10 07:56:55 +00:00
|
|
|
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
|
2024-02-18 00:10:30 +00:00
|
|
|
with:
|
|
|
|
name: coverage.out
|
|
|
|
path: coverage.out
|
|
|
|
retention-days: 1
|
|
|
|
if-no-files-found: error
|
|
|
|
|
|
|
|
upload-to-codecov:
|
|
|
|
needs:
|
|
|
|
- unit-tests
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2024-10-24 09:42:17 +00:00
|
|
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
2024-02-18 00:10:30 +00:00
|
|
|
- name: Download coverage
|
2024-09-02 21:01:25 +00:00
|
|
|
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
|
2024-02-18 00:10:30 +00:00
|
|
|
with:
|
|
|
|
name: coverage.out
|
|
|
|
- name: Upload Report to Codecov
|
2024-12-06 08:26:28 +00:00
|
|
|
uses: codecov/codecov-action@7f8b4b4bde536c465e797be725718b88c5d95e0e # v5.1.1
|
2024-02-18 00:10:30 +00:00
|
|
|
with:
|
|
|
|
files: ./coverage.out
|
|
|
|
fail_ci_if_error: true
|
|
|
|
verbose: true
|
|
|
|
env:
|
|
|
|
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|