fix: add 60% coverage minimum to CI, scope prettier to staged frontend files

This commit is contained in:
2026-07-11 17:09:37 +01:00
parent 7d6cb0c375
commit 0afa642a10
4 changed files with 22 additions and 16 deletions
+13
View File
@@ -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: |