-
-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (43 loc) · 1.27 KB
/
test.yml
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
42
43
44
45
46
47
name: Test
concurrency:
group: ${{ github.ref }}-test
cancel-in-progress: true
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
channel: "stable"
cache: true
- run: flutter pub get
- name: Run tests
run: flutter test --branch-coverage -r github
# - name: Generate coverage report
# run: genhtml coverage/lcov.info -o coverage > coverage/summary.txt
# - name: Check coverage level
# run: dart run scripts/coverage.dart
# - name: Setup LCOV
# run: |
# sudo apt-get -y install lcov
# lcov --version
# - name: Report code coverage
# uses: zgosalvez/github-actions-report-lcov@v3
# with:
# coverage-files: coverage/lcov.info
# minimum-coverage: 99.4
# artifact-name: code-coverage-report
# github-token: ${{ secrets.GITHUB_TOKEN }}
# update-comment: true
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}