Compare commits

...

1 Commits

Author SHA1 Message Date
Herbert Poul b7c52c550a add test coverage ci with codecov 4 years ago
  1. 20
      .github/workflows/coverage.yml
  2. 20
      _tool/test-coverage.sh

20
.github/workflows/coverage.yml

@ -0,0 +1,20 @@
name: Coverage
on: [push]
jobs:
build:
strategy:
matrix:
os: ['ubuntu-latest']
dart_channel: ['stable']
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v1
- uses: cedx/setup-dart@v2
with:
release-channel: ${{ matrix.dart_channel }}
- run: _tool/test-coverage.sh

20
_tool/test-coverage.sh

@ -0,0 +1,20 @@
#!/bin/bash
set -xeu
cd "${0%/*}"/..
pub get
pub global activate test_coverage
fail=false
pub global run test_coverage || fail=true
echo "fail=$fail"
bash <(curl -s https://codecov.io/bash) -f coverage/lcov.info
test "$fail" == "true" && exit 1
echo "Success 🎉"
exit 0
Loading…
Cancel
Save