diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 6bb7f699..f7fa413a 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -1,5 +1,9 @@ name: ci +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + on: pull_request: branches: @@ -35,6 +39,10 @@ jobs: - ./.github/workflows/main.yaml - ./.github/actions/dart_package - packages/artifact_proxy/** + cutler: + - ./.github/workflows/main.yaml + - ./.github/actions/dart_package + - packages/cutler/** discord_gcp_alerts: - ./.github/workflows/main.yaml - ./.github/actions/dart_package @@ -89,6 +97,7 @@ jobs: uses: ./.github/actions/dart_package with: working_directory: packages/${{ matrix.package }} + min_coverage: ${{ matrix.package == 'cutler' && '10' || '100' }} verify_packages: needs: changes diff --git a/README.md b/README.md index 26c4ef63..1c2c53f9 100644 --- a/README.md +++ b/README.md @@ -50,6 +50,25 @@ We don't yet have a script to run tests locally. For now, we recommend using (If you run it in the root, it will find packages in bin/cache/flutter and try to run tests there, some of which will fail.) +To generate a coverage report install `lcov`: + +``` +brew install lcov +``` + +Then run tests with the `--coverage` flag: + +``` +very_good test -r --coverage +genhtml coverage/lcov.info -o coverage +``` + +You can view the generated coverage report via: + +``` +open coverage/index.html +``` + ### Tracking coverage The following command will generate a coverage report for the Dart packages: