Update check-dart.yaml latest_minor (#70) #10
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Pub Score | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
pub-score: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: axel-op/dart-package-analyzer@v3 | |
id: score | |
with: | |
githubToken: ${{ github.token }} | |
- name: Check score | |
env: | |
min_score: 100 | |
cur_points: ${{ steps.score.outputs.total }} | |
max_points: ${{ steps.score.outputs.total_max }} | |
run: | | |
score=$(( $cur_points * 100 / $max_points )) | |
if test $score -lt $min_score | |
then | |
exec >&2 | |
echo "Pub package score is too low." | |
echo "Al least $min_score is expected, but we got $score :(" | |
exit 1 | |
fi |