Update README.md #29
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: coverage | |
on: [push, pull_request] | |
jobs: | |
test-coverage: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v3 | |
with: | |
python-version: '3.12' | |
- name: "Install python dependencies" | |
run: | | |
pip3 install pytest | |
pip3 install pytest-cov | |
- name: "Get coverage" | |
run: | | |
COVERAGE=$(pytest --cov Moby_Land | grep 'TOTAL' | awk '{print $NF}' | tr -d '%') | |
if [ "$COVERAGE" -gt 89 ]; then | |
echo "success" | |
else | |
echo "failure" | |
fi |