Skip to content

Commit

Permalink
fix: poetry tests runs failing (#601)
Browse files Browse the repository at this point in the history
  • Loading branch information
RobPasMue authored Oct 4, 2024
1 parent d5877c6 commit 479443d
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions tests-pytest/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -241,16 +241,25 @@ runs:
python -m pip install .[tests]
fi
- name: "Executing test suite without using xvfb"
- name: "Set up pytest run command"
shell: bash
run: |
if [[ ${{ env.BUILD_BACKEND }} == 'poetry' ]]; then
echo "PYTEST_RUN=$(echo 'poetry run pytest')" >> $GITHUB_ENV
else
echo "PYTEST_RUN=$(echo 'python -m pytest')" >> $GITHUB_ENV
fi
- name: "Executing test suite"
if: inputs.requires-xvfb == 'false'
shell: bash
run: |
${{ env.ACTIVATE_VENV }}
pytest ${{ inputs.pytest-markers }} ${{ inputs.pytest-extra-args }} ${{ inputs.pytest-postargs }}
${{ env.PYTEST_RUN }} ${{ inputs.pytest-markers }} ${{ inputs.pytest-extra-args }} ${{ inputs.pytest-postargs }}
- name: "Executing test suite using xvfb"
if: inputs.requires-xvfb == 'true'
shell: bash
run: |
${{ env.ACTIVATE_VENV }}
xvfb-run pytest ${{ inputs.pytest-markers }} ${{ inputs.pytest-extra-args }} ${{ inputs.pytest-postargs }}
xvfb-run ${{ env.PYTEST_RUN }} ${{ inputs.pytest-markers }} ${{ inputs.pytest-extra-args }} ${{ inputs.pytest-postargs }}

0 comments on commit 479443d

Please sign in to comment.