Skip to content

Commit 80e9c18

Browse files
committed
Update ci.yml
Update ci.yml Update ci.yml
1 parent b400c51 commit 80e9c18

File tree

1 file changed

+16
-8
lines changed

1 file changed

+16
-8
lines changed

.github/workflows/ci.yml

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)