Skip to content

Commit

Permalink
Better syntax for coverage argument
Browse files Browse the repository at this point in the history
  • Loading branch information
jonryser committed Nov 1, 2024
1 parent 0166f97 commit 15512f5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/actions/test-python/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,11 @@ runs:
# Run test coverage using as many cores as are available.
tox run -e coverage-py${major_minor}
else
pytest --cov --cov-report html -n auto ${{ inputs.min-coverage > 0 && "--cov-fail-under=${{ inputs.min-coverage }}" }}
coverage_arg=""
if [ ${{ inputs.min-coverage }} -gt 0 ]; then
coverage_arg="--cov-fail-under=${{ inputs.min-coverage }}"
fi
pytest --cov --cov-report html -n auto $coverage_arg
fi
shell: bash

Expand Down

0 comments on commit 15512f5

Please sign in to comment.