Skip to content

Commit 6bd9182

Browse files
kmartinsrenancaraujowolfenrain
authored
ci: add the check-ignore flag in dart coverage (#107)
* ci: add the check-ignore flag in dart coverage * refactor: add flag check ignore as an option * refactor: set input as boolean * doc: update readme * Update README.md Co-authored-by: Jochum van der Ploeg <[email protected]> * Update .github/workflows/dart_package.yml Co-authored-by: Jochum van der Ploeg <[email protected]> --------- Co-authored-by: Renan <[email protected]> Co-authored-by: Jochum van der Ploeg <[email protected]>
1 parent 405e5d5 commit 6bd9182

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

.github/workflows/dart_package.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ on:
2727
required: false
2828
type: string
2929
default: "vm"
30+
check_ignore:
31+
required: false
32+
type: boolean
33+
default: false
3034
report_on:
3135
required: false
3236
type: string
@@ -77,7 +81,7 @@ jobs:
7781
- name: 🧪 Run Tests
7882
run: |
7983
dart pub global activate coverage 1.2.0
80-
dart test -j ${{inputs.concurrency}} --coverage=coverage --platform=${{inputs.platform}} && dart pub global run coverage:format_coverage --lcov --in=coverage --out=coverage/lcov.info --packages=.dart_tool/package_config.json --report-on=${{inputs.report_on}}
84+
dart test -j ${{inputs.concurrency}} --coverage=coverage --platform=${{inputs.platform}} && dart pub global run coverage:format_coverage --lcov ${{(inputs.check_ignore && '--check-ignore') || ''}} --in=coverage --out=coverage/lcov.info --packages=.dart_tool/package_config.json --report-on=${{inputs.report_on}}
8185
8286
- name: 📊 Check Code Coverage
8387
uses: VeryGoodOpenSource/very_good_coverage@v2

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,12 @@ The Dart package workflow consists of the following steps:
8585

8686
**Default** `"lib test"`
8787

88+
#### `check_ignore`
89+
90+
**Optional** Allows ignoring lines from [coverage][coverage].
91+
92+
**Default** `false`
93+
8894
#### `report_on`
8995

9096
**Optional** A comma separated list of folders that should be checked in code coverage.
@@ -386,3 +392,4 @@ jobs:
386392
[very_good_ventures_link]: https://verygood.ventures
387393
[very_good_workflows_blog_link]: https://verygood.ventures/blog/configuring-workflows-for-your-flutter-projects?utm_source=github&utm_medium=readme&utm_campaign=workflows_readme
388394
[commitizen]: https://github.com/commitizen/conventional-commit-types
395+
[coverage]: https://pub.dev/packages/coverage

0 commit comments

Comments
 (0)