From 3bbb4a24b426d6756c1f245fa1dcf1890dca56b1 Mon Sep 17 00:00:00 2001 From: Peter Leibiger Date: Fri, 15 Mar 2024 00:53:52 +0100 Subject: [PATCH] Use full_coverage package --- .github/workflows/coverage_base.yml | 2 ++ .github/workflows/tests.yml | 2 ++ .gitignore | 1 + melos.yaml | 8 +++++++- 4 files changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/coverage_base.yml b/.github/workflows/coverage_base.yml index 317cba665..ecd5878ac 100644 --- a/.github/workflows/coverage_base.yml +++ b/.github/workflows/coverage_base.yml @@ -33,6 +33,8 @@ jobs: run: sudo apt-get update && sudo apt-get install -y squid - run: dart pub get - uses: bluefireteam/melos-action@v3 + - name: '[Coverage] Setup full coverage' + run: melos run coverage:setup - name: '[Verify step] Test Dart packages [VM]' run: melos run test:dart - name: '[Verify step] Test Dart packages [Chrome]' diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index ef3a7e025..cd2ec103d 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -63,6 +63,8 @@ jobs: - name: '[Verify step] Publish dry-run' if: ${{ matrix.sdk == 'stable' }} run: melos run publish-dry-run + - name: '[Coverage] Setup full coverage' + run: melos run coverage:setup - name: '[Verify step] Test Dart packages [VM]' run: melos run test:dart - name: '[Verify step] Test Dart packages [Chrome]' diff --git a/.gitignore b/.gitignore index 43efb4a52..c21ee7612 100644 --- a/.gitignore +++ b/.gitignore @@ -28,3 +28,4 @@ doc/api/ !/.idea/modules.xml coverage +**/test/full_coverage_test.dart diff --git a/melos.yaml b/melos.yaml index 01b4cd139..b3e5cdf08 100644 --- a/melos.yaml +++ b/melos.yaml @@ -24,7 +24,7 @@ command: # Clean coverage files rm -rf coverage rm -rf pubspec.lock - melos exec --dir-exists coverage -- "rm -rf coverage" + melos exec --dir-exists="coverage" -- "rm -rf coverage" scripts: analyze: @@ -96,9 +96,15 @@ scripts: test:coverage: name: Run all tests and display coverage run: | + melos run coverage:setup melos run test melos run coverage:format melos run coverage:show + coverage:setup: + name: Setup full coverage + run: | + dart pub global activate full_coverage + melos exec --dir-exists="test" -- full_coverage coverage:format: name: Format coverage run: |