@@ -28,23 +28,36 @@ jobs:
28
28
target : web
29
29
steps :
30
30
- uses : actions/checkout@v2
31
+
31
32
- uses : actions/setup-java@v1
32
33
with :
33
34
java-version : ' 8'
35
+
34
36
- uses : subosito/flutter-action@v1
35
37
with :
36
38
channel : ${{ matrix.channel }}
39
+
37
40
- name : enable web
38
41
if : matrix.target == 'web'
39
42
run : flutter config --enable-web
43
+
40
44
# https://github.com/flutter/flutter/issues/59522#issuecomment-646208247
41
45
- name : Fix iOS build bug
42
46
if : matrix.target == 'ios'
43
47
run : rm flutter/example/ios/Podfile
48
+
44
49
- name : Test
45
50
run : |
46
51
cd flutter
47
- flutter test
52
+ flutter pub get
53
+ flutter test --coverage test
54
+
55
+ - uses : codecov/codecov-action@v1
56
+ if : runner.os == 'Linux'
57
+ with :
58
+ name : sentry_flutter
59
+ file : ./flutter/coverage/lcov.info
60
+
48
61
- name : Build ${{ matrix.target }}
49
62
env :
50
63
SENTRY_AUTH_TOKEN : ${{ secrets.SENTRY_AUTH_TOKEN }}
@@ -56,12 +69,33 @@ jobs:
56
69
flutter build ios --release --no-codesign
57
70
;;
58
71
android)
59
- flutter build appbundle
72
+ flutter build appbundle --release
60
73
;;
61
74
web)
62
75
flutter build web
63
76
;;
64
77
esac
78
+
79
+ format :
80
+ runs-on : ubuntu-latest
81
+ steps :
82
+ - uses : actions/checkout@v2
83
+ - uses : subosito/flutter-action@v1
84
+ - run : |
85
+ cd flutter
86
+ flutter pub get
87
+ flutter format --set-exit-if-changed .
88
+
89
+ analyze :
90
+ runs-on : ubuntu-latest
91
+ steps :
92
+ - uses : actions/checkout@v2
93
+ - uses : subosito/flutter-action@v1
94
+ - run : |
95
+ cd flutter
96
+ flutter pub get
97
+ flutter analyze
98
+
65
99
package-analysis :
66
100
runs-on : ubuntu-latest
67
101
steps :
@@ -77,29 +111,32 @@ jobs:
77
111
TOTAL_MAX : ${{ steps.analysis.outputs.total_max }}
78
112
run : |
79
113
PERCENTAGE=$(( $TOTAL * 100 / $TOTAL_MAX ))
80
- if (( $PERCENTAGE < 90 ))
114
+ if (( $PERCENTAGE < 100 ))
81
115
then
82
116
echo Score too low!
83
117
exit 1
84
118
fi
119
+
85
120
pod-lint :
86
121
runs-on : macos-latest
87
122
steps :
88
123
- uses : actions/checkout@v2
89
124
# https://github.com/CocoaPods/CocoaPods/issues/5275#issuecomment-315461879
90
125
- run : pod lib lint flutter/ios/sentry_flutter.podspec --skip-import-validation --allow-warnings
126
+
91
127
swift-lint :
92
128
runs-on : ubuntu-latest
93
129
steps :
94
130
- uses : actions/checkout@v2
95
- -
uses :
norio-nomura/[email protected]
131
+ -
uses :
norio-nomura/[email protected]
132
+
96
133
ktlint :
97
134
runs-on : ubuntu-latest
98
135
steps :
99
136
- uses : actions/checkout@v2
100
- - run : brew install ktlint
101
- - name : run ktlint
102
- run : ktlint --reporter=checkstyle,output=build/ktlint-report.xml || true
103
- - uses : yutailang0119/action-ktlint@v1.0.0
137
+ - run : |
138
+ brew install ktlint
139
+ ktlint --reporter=checkstyle,output=build/ktlint-report.xml || true
140
+ - uses : yutailang0119/action-ktlint@v1
104
141
with :
105
142
xml_path : build/ktlint-report.xml
0 commit comments