fix: add 60% coverage minimum to CI, scope prettier to staged frontend files
This commit is contained in:
@@ -467,6 +467,19 @@ jobs:
|
||||
echo "No coverage file generated"
|
||||
fi
|
||||
|
||||
- name: Check coverage minimum
|
||||
if: matrix.label == 'dev'
|
||||
working-directory: backend
|
||||
run: |
|
||||
if [ -f coverage.out ]; then
|
||||
COVERAGE=$(go tool cover -func=coverage.out | grep total | awk '{print $3}' | sed 's/%//')
|
||||
if (( $(echo "$COVERAGE < 60" | bc -l) )); then
|
||||
echo "FAIL: Coverage $COVERAGE% is below 60% minimum"
|
||||
exit 1
|
||||
fi
|
||||
echo "PASS: Coverage $COVERAGE% meets 60% minimum"
|
||||
fi
|
||||
|
||||
- name: Upload coverage artifact
|
||||
if: matrix.label == 'dev'
|
||||
run: |
|
||||
|
||||
Reference in New Issue
Block a user