Skip to content

Commit

Permalink
[ci] Adding a new test to validate new code is tested
Browse files Browse the repository at this point in the history
  • Loading branch information
hugsy committed Oct 13, 2022
1 parent a759262 commit 3af8221
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/run-tests.yml
Expand Up @@ -88,3 +88,10 @@ jobs:
run: |
python${{ env.PY_VER }} -m pylint --rcfile=$(pwd)/.pylintrc gef.py tests/*/*.py
- name: Run test coverage
run: |
current_score=$(curl --silent https://hugsy.github.io/gef/coverage/gef_py.html | grep pc_cov | sed 's?.*<span class="pc_cov">\([^%]*\)%</span>?\1?g')
bash docs/generate-coverage-docs.sh
new_score=$(cat docs/coverage/gef_py.html | grep pc_cov | sed 's?.*<span class="pc_cov">\([^%]*\)%</span>?\1?g')
echo "Test coverage score: ${new_score}% (old ${current_score}%)"
test ${current_score} -gt ${new_score} && (echo "New score cannot be lower." ; exit 1)

0 comments on commit 3af8221

Please sign in to comment.