Skip to content

Commit

Permalink
Update coverage report action (cfug#2219)
Browse files Browse the repository at this point in the history
The new version now supports listing individual changed files, not just
packages and adds a flag that hides all files without changes to the
coverage. We use that for the PR comment.

With VannaDii/pub-dev#9 the `cobertura` package
now also reports the correct line coverage.
 
<!-- Write down your pull request descriptions. -->

### New Pull Request Checklist

- [ ] I have read the
[Documentation](https://pub.dev/documentation/dio/latest/)
- [ ] I have searched for a similar pull request in the
[project](https://github.com/cfug/dio/pulls) and found none
- [ ] I have updated this branch with the latest `main` branch to avoid
conflicts (via merge from master or rebase)
- [ ] I have added the required tests to prove the fix/feature I'm
adding
- [ ] I have updated the documentation (if necessary)
- [ ] I have run the tests without failures
- [ ] I have updated the `CHANGELOG.md` in the corresponding package

### Additional context and info (if any)

<!-- Provide more context and info about the PR. -->

Co-authored-by: Alex Li <[email protected]>
Co-authored-by: Jonas Uekötter <[email protected]>
  • Loading branch information
3 people committed May 19, 2024
1 parent d2a632f commit 0eab30a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/coverage_base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,6 @@ jobs:
run: melos run test:flutter
- name: '[Coverage] Generate report'
run: melos run coverage:combine
- uses: clearlyip/code-coverage-report-action@v4
- uses: clearlyip/code-coverage-report-action@v5
with:
filename: 'coverage/cobertura.xml'
3 changes: 2 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,13 @@ jobs:
if: ${{ matrix.sdk == 'stable' }}
run: melos run coverage:show
- name: '[Coverage] Create Report'
uses: clearlyip/code-coverage-report-action@v4
uses: clearlyip/code-coverage-report-action@v5
id: code_coverage_report
if: ${{ matrix.sdk == 'stable' && github.actor != 'dependabot[bot]'}}
with:
artifact_download_workflow_names: 'Verify packages abilities,coverage_baseline'
filename: 'coverage/cobertura.xml'
only_list_changed_files: true
- name: '[Coverage] Write PR number to file'
if: ${{ matrix.sdk == 'stable' && github.actor != 'dependabot[bot]'}}
run: echo ${{ github.event.number }} > pr_number.txt
Expand Down

0 comments on commit 0eab30a

Please sign in to comment.