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:
|
|
|
|
pull_request:
|
|
|
|
branches:
|
2024-02-18 01:10:30 +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:
|
2024-02-18 01:10:30 +01:00
|
|
|
- name: Checkout
|
2024-10-24 09:42:17 +00:00
|
|
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
2024-02-18 01:10:30 +01: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-12-18 11:00:14 +00:00
|
|
|
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
|
2024-02-18 01:10:30 +01: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 01:10:30 +01:00
|
|
|
- name: Download coverage
|
2024-09-02 23:01:25 +02:00
|
|
|
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
|
2024-02-18 01:10:30 +01:00
|
|
|
with:
|
|
|
|
name: coverage.out
|
|
|
|
- name: Upload Report to Codecov
|
2024-12-06 16:26:28 +08:00
|
|
|
uses: codecov/codecov-action@7f8b4b4bde536c465e797be725718b88c5d95e0e # v5.1.1
|
2024-02-18 01:10:30 +01:00
|
|
|
with:
|
|
|
|
files: ./coverage.out
|
|
|
|
fail_ci_if_error: true
|
|
|
|
verbose: true
|
|
|
|
env:
|
|
|
|
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|