feat: upload code coverage to codecov

This commit is contained in:
td 2025-03-11 14:14:04 +01:00
parent ef2c7a628e
commit 5db5365ca3
No known key found for this signature in database
GPG Key ID: 62A30523D4D6CE28
2 changed files with 16 additions and 2 deletions

9
.codecov.yaml Normal file
View File

@ -0,0 +1,9 @@
coverage:
status:
project:
default:
# Do not pass if PR reduces coverage by more than 5%
target: auto
threshold: 5
comment:
layout: "header, diff, components, files, footer"

View File

@ -73,7 +73,7 @@ jobs:
path: coverage_dir/
retention-days: 1
merge_converage:
merge_coverage:
if: ${{ !cancelled() }}
runs-on: ubuntu-latest
timeout-minutes: 30
@ -87,6 +87,11 @@ jobs:
lcov -a coverage/lcov.info -a coverage_without_olm/lcov.info -o merged.info
genhtml merged.info -o merged
echo $(lcov --summary merged.info | grep 'lines......:') >> $GITHUB_STEP_SUMMARY
- name: Codecov - Upload coverage
uses: codecov/codecov-action@v4
with:
token: ${{secrets.CODECOV_TOKEN}}
files: ./merged.info, ./coverage/lcov.info, ./coverage_without_olm/lcov.info
- uses: actions/upload-artifact@v4
with:
name: merged
@ -95,7 +100,7 @@ jobs:
review_app_coverage:
if: github.event_name == 'pull_request'
needs: [merge_converage]
needs: [merge_coverage]
secrets: inherit
uses: famedly/frontend-ci-templates/.github/workflows/review-app.yml@main
with: