Skip to content

Commit

Permalink
ci: add panaThreshold option to the analyze workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
vaind committed Nov 7, 2022
1 parent bbf4cee commit 92cc2b7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/workflows/analyze.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ on:
required: false
type: string
default: dart
panaThreshold:
description: Minumum percentage of Dart Package Analyzer score that must be achieved.
required: false
type: number
default: 100

jobs:
analyze:
Expand Down Expand Up @@ -54,7 +59,7 @@ jobs:
TOTAL_MAX: ${{ steps.analysis.outputs.total_max }}
run: |
PERCENTAGE=$(( $TOTAL * 100 / $TOTAL_MAX ))
if (( $PERCENTAGE < 90 ))
if (( $PERCENTAGE < ${{ inputs.panaThreshold }} ))
then
echo Score too low!
exit 1
Expand Down

0 comments on commit 92cc2b7

Please sign in to comment.