-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (33 loc) · 1.03 KB
/
coverage.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: Code Coverage Update
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Setup Flutter
uses: subosito/flutter-action@v1
with:
channel: "stable"
- name: Install lcov
run: sudo apt-get install -y lcov
- name: Install dependencies
run: flutter pub get
working-directory: pokedex
- name: Run tests
run: |
flutter test --coverage
lcov --list coverage/lcov.info
if [ -f coverage/lcov.info ]; then
find lib -name '*.dart' | xargs -I {} lcov --add-tracefile coverage/lcov.info --output-file coverage/lcov.info
lcov --remove coverage/lcov.info 'lib/generated/*' --output-file coverage/lcov.info
fi
working-directory: pokedex
- name: Upload coverage reports to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}