File tree Expand file tree Collapse file tree 1 file changed +16
-8
lines changed
Expand file tree Collapse file tree 1 file changed +16
-8
lines changed Original file line number Diff line number Diff line change @@ -157,16 +157,24 @@ jobs:
157157 steps :
158158 - name : Checkout project
159159 uses : actions/checkout@v4
160- - name : Setup Flutter
161- uses : subosito/flutter-action@v2
162- with :
163- cache : true
164160 - name : Install pana
161+ uses : flutterings/dart-package-analyzer@v1
162+ id : analysis
163+ with :
164+ flutter_version : 3.24.5
165+ flutter_channel : stable
166+ relativePath : .
167+ - name : Check scores
168+ env :
169+ TOTAL : ${{ steps.analysis.outputs.total }}
170+ TOTAL_MAX : ${{ steps.analysis.outputs.total_max }}
165171 run : |
166- npm install --global cwebp-bin webpinfo gif2webp-bin && \
167- dart pub global activate pana
168- - name : Check package score
169- run : pana --exit-code-threshold 0 --no-dartdoc .
172+ PERCENTAGE=$(( $TOTAL * 100 / $TOTAL_MAX ))
173+ if (( $PERCENTAGE < 100 ))
174+ then
175+ echo Score too low!
176+ exit 1
177+ fi
170178 build-android :
171179 name : " [Android] Build APK"
172180 runs-on : ubuntu-latest
You can’t perform that action at this time.
0 commit comments