mobx.dart
mobx.dart copied to clipboard
ci: if the test fails, github action should fail.
Describe the changes proposed in this Pull Request.
If the test fails, github action should fail. https://github.com/mobxjs/mobx.dart/pull/784 has failed tests, but check succeeded.
Pull Request Checklist
- [x] If the changes are being made to code, ensure the version in
pubspec.yamlis updated. - [x] Increment the
major/minor/patch/patch-count, depending on the complexity of change - [x] Add the necessary unit tests to ensure the coverage does not drop
- [x] Update the Changelog to include all changes made in this PR
- [x] Run the
set:versionscommand usingnpmoryarn. You can find this command in thepackage.jsonfile in the root directory - [x] Include the necessary reviewers for the PR
- [x] Update the docs if there are any API changes or additions to functionality
Deploy Preview for mobx canceled.
| Name | Link |
|---|---|
| Latest commit | 3ffa4d0b74251e16fc5b1f2fef5894f8f37830f1 |
| Latest deploy log | https://app.netlify.com/sites/mobx/deploys/6315f6bdf53df500084fe51e |
Codecov Report
Merging #835 (0746b1c) into master (0746b1c) will not change coverage. The diff coverage is
n/a.
:exclamation: Current head 0746b1c differs from pull request most recent head 3ffa4d0. Consider uploading reports for the commit 3ffa4d0 to get more accurate results
@@ Coverage Diff @@
## master #835 +/- ##
=======================================
Coverage 98.42% 98.42%
=======================================
Files 37 37
Lines 1462 1462
=======================================
Hits 1439 1439
Misses 23 23
| Flag | Coverage Δ | |
|---|---|---|
| flutter_mobx | 100.00% <0.00%> (ø) |
|
| mobx | 98.31% <0.00%> (ø) |
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update 0746b1c...3ffa4d0. Read the comment docs.
https://github.com/mobxjs/mobx.dart/runs/6959595920?check_suite_focus=true
Is this working @amondnet ? There are lot of deleted lines in coverage.sh. Not sure if that is running the tests as expected, including the collection of coverage
@pavanpodila Like the flutter test, the dart test has a coverage argument and .
https://github.com/mobxjs/mobx.dart/blob/c963f6cba2fdf23d7ba42ce44829152adfcd105d/.github/workflows/build.yml#L62
https://pub.dev/packages/test#collecting-code-coverage
dart run test --coverage=./coverage
https://github.com/dart-lang/coverage#running-tests-with-coverage
dart pub global run coverage:test_with_coverage
https://github.com/dart-lang/test/pull/1088 https://github.com/dart-lang/test/pull/1600
I tested mobx 2.0.7.
git checkout mobx-2.0.7
cd mobx
- use
dart test
dart run test --coverage=./coverage test/all_tests.dart
dart run coverage:format_coverage \
--lcov \
--in=coverage/coverage.json \
--out=coverage/lcov.info \
--packages=.dart_tool/package_config.json \
--report-on=lib
https://gist.github.com/amondnet/be02b37c58cae3a1740fb9d1a6747a3f#file-dart-lcov
2. use tool/coverage.sh
https://gist.github.com/amondnet/be02b37c58cae3a1740fb9d1a6747a3f#file-tool-lcov
text compare

https://gist.github.com/amondnet/be02b37c58cae3a1740fb9d1a6747a3f
dart run test --coverage=./coverage sometimes failed, we should use dart pub global run coverage:test_with_coverage