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-09-26 07:36:19 +00:00
|
|
|
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
|
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-09-02 21:01:25 +00:00
|
|
|
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
|
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-09-26 07:36:19 +00:00
|
|
|
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
|
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-10-02 07:26:24 +00:00
|
|
|
uses: codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238 # v4.6.0
|
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 }}
|