Skip to content

Commit

Permalink
feat(test): add pytest-cov and support requirements-test.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
armand-sauzay committed Jun 7, 2024
1 parent 2c3ac5b commit 0332eb4
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions test/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,15 @@ runs:
- name: Install pip dependencies
if: hashFiles('poetry.lock') == ''
shell: bash
#if there is a requirements-dev.txt or requirements-test.txt, we install that
run: |
pip install -r requirements.txt
if [[ -f requirements-dev.txt ]]; then
pip install -r requirements-dev.txt
elif [[ -f requirements-test.txt ]]; then
pip install -r requirements-test.txt
else
pip install -r requirements.txt
fi
- name: Run setup script
if: hashFiles('poetry.lock') == '' && inputs.setup-script != ''
shell: bash
Expand All @@ -61,7 +68,7 @@ runs:
elif [[ -f setup.py ]]; then
python setup.py test -- ${{ inputs.test-flags }}
else
pip install pytest
pip install pytest pytest-cov
pytest ${{ inputs.test-flags }}
fi
# If we do have a poetry.lock, we use a poetry based workflow
Expand Down

0 comments on commit 0332eb4

Please sign in to comment.