diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml
index a2fef92d0..5d10553dd 100644
--- a/.github/workflows/run-tests.yml
+++ b/.github/workflows/run-tests.yml
@@ -76,9 +76,11 @@ jobs:
- name: Run test coverage
if: matrix.os == 'ubuntu-22.04'
+ env:
+ ALLOWED_MARGIN: 0.05
run: |
current_score=$(curl --silent https://hugsy.github.io/gef/coverage/gef_py.html | grep pc_cov | sed 's?.*\([^%]*\)%?\1?g')
bash scripts/generate-coverage-docs.sh
new_score=$(cat docs/coverage/gef_py.html | grep pc_cov | sed 's?.*\([^%]*\)%?\1?g')
echo "New coverage score: ${new_score}% (current ${current_score}%)"
- python${{ env.PY_VER }} -c "( ${new_score} >= ${current_score} ) or exit(1)"
+ python${{ env.PY_VER }} -c "( ${new_score} < ( ${current_score} - ${{ env.ALLOWED_MARGIN}} ) ) and exit(1)"