-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
68 lines (52 loc) · 1.61 KB
/
bloc_test.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: bloc_test
on:
push:
paths:
- "packages/bloc_test/**"
- ".github/workflows/bloc_test.yaml"
pull_request:
paths:
- "packages/bloc_test/**"
- ".github/workflows/bloc_test.yaml"
jobs:
build:
defaults:
run:
working-directory: packages/bloc_test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dart-lang/setup-dart@v1
- name: Install Dependencies
run: dart pub get
- name: Format
run: dart format --set-exit-if-changed .
- name: Analyze
run: dart analyze --fatal-infos --fatal-warnings .
- name: Run Tests
run: |
dart pub global activate coverage 1.2.0
dart test --coverage=coverage && dart pub global run coverage:format_coverage --lcov --in=coverage --out=coverage/lcov.info --packages=.dart_tool/package_config.json --report-on=lib
- name: Check Code Coverage
uses: VeryGoodOpenSource/very_good_coverage@v2
with:
path: packages/bloc_test/coverage/lcov.info
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
pana:
defaults:
run:
working-directory: packages/bloc_test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: subosito/[email protected]
- name: Install Dependencies
run: |
flutter packages get
flutter pub global activate pana
sudo apt-get install webp
- name: Verify Pub Score
run: ../../tool/verify_pub_score.sh