mobx.dart icon indicating copy to clipboard operation
mobx.dart copied to clipboard

ci: if the test fails, github action should fail.

Open amondnet opened this issue 3 years ago • 5 comments

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.yaml is 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:versions command using npm or yarn. You can find this command in the package.json file 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

amondnet avatar Jun 20 '22 02:06 amondnet

Deploy Preview for mobx canceled.

Name Link
Latest commit 3ffa4d0b74251e16fc5b1f2fef5894f8f37830f1
Latest deploy log https://app.netlify.com/sites/mobx/deploys/6315f6bdf53df500084fe51e

netlify[bot] avatar Jun 20 '22 02:06 netlify[bot]

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

Impacted file tree graph

@@           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 data Powered by Codecov. Last update 0746b1c...3ffa4d0. Read the comment docs.

codecov[bot] avatar Jun 20 '22 02:06 codecov[bot]

https://github.com/mobxjs/mobx.dart/runs/6959595920?check_suite_focus=true

amondnet avatar Jun 20 '22 02:06 amondnet

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 avatar Jun 25 '22 13:06 pavanpodila

@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
  1. 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

스크린샷 2022-06-27 오후 1 00 05

https://gist.github.com/amondnet/be02b37c58cae3a1740fb9d1a6747a3f

amondnet avatar Jun 27 '22 04:06 amondnet

dart run test --coverage=./coverage sometimes failed, we should use dart pub global run coverage:test_with_coverage

amondnet avatar Sep 05 '22 02:09 amondnet