forked from felangel/equatable
-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (40 loc) · 1.23 KB
/
main.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
name: build
on:
push:
branches:
- master
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.4
- uses: dart-lang/setup-dart@v1
- name: Install Dependencies
run: dart pub get
- name: Format
run: dart format .
- name: Analyze
run: dart analyze .
- name: Run Tests
run: |
pub global activate test_coverage
export PATH=$PATH:$HOME/.pub-cache/bin
test_coverage
- name: Check Code Coverage
uses: VeryGoodOpenSource/very_good_coverage@v1.1.1
pana:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.4
- uses: subosito/flutter-action@v1.5.3
- name: Install Dependencies
run: |
flutter packages get
flutter pub global activate pana
- name: Verify Pub Score
run: |
PANA=$(pana . --no-warning); PANA_SCORE=$(echo $PANA | sed -n "s/.*Points: \([0-9]*\)\/\([0-9]*\)./\1\/\2/p")
echo "score: $PANA_SCORE"
IFS='/'; read -a SCORE_ARR <<< "$PANA_SCORE"; SCORE=SCORE_ARR[0]; TOTAL=SCORE_ARR[1]
if (( $SCORE < $TOTAL )); then echo $PANA; echo "minimum score not met!"; exit 1; fi