Set conservative line and branch coverage floors for stable HA versions (#1566)

This commit is contained in:
Bas Nijholt 2026-09-06 17:18:47 +02:00 committed by GitHub
commit 87486f9eb3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 10 additions and 1 deletions

View file

@ -103,6 +103,15 @@ jobs:
exit 1
fi
if [[ "${CORE_VERSION}" != "dev" && "${PYTEST_OUTCOME}" == "success" ]]; then
echo "Required coverage: 89% lines and 80% branches." >> "${GITHUB_STEP_SUMMARY}"
if ! jq -e '.totals | .covered_lines * 100 >= .num_statements * 89
and .covered_branches * 100 >= .num_branches * 80' core/coverage.json > /dev/null; then
echo "::error::Coverage must be at least 89% lines and 80% branches."
exit 1
fi
fi
- name: Upload coverage reports
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v7.0.1