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-09-26 07:36:19 +00:00
|
|
|
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
|
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-09-02 23:01:25 +02:00
|
|
|
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.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-09-26 07:36:19 +00:00
|
|
|
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
|
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-06-18 06:12:21 +00:00
|
|
|
uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # v4.5.0
|
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 }}
|