Skip to content

Commit

Permalink
Test Poetry virtualenv location
Browse files Browse the repository at this point in the history
  • Loading branch information
br3ndonland committed Nov 2, 2021
1 parent 8fa29ea commit 85c98f3
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,16 @@ jobs:
esac
- name: Install dependencies
run: poetry install --no-interaction
- name: Test virtualenv location
run: |
EXPECTED_VIRTUALENV_PATH=${{ github.workspace }}/.venv
INSTALLED_VIRTUALENV_PATH=$(poetry env info --path)
echo "The virtualenv should be at $EXPECTED_VIRTUALENV_PATH."
echo "Poetry is using a virtualenv at $INSTALLED_VIRTUALENV_PATH."
case "$INSTALLED_VIRTUALENV_PATH" in
"$EXPECTED_VIRTUALENV_PATH") echo "Correct Poetry virtualenv." ;;
*) echo "Incorrect Poetry virtualenv." && exit 1 ;;
esac
- name: Run pre-commit hooks
run: poetry run pre-commit run --all-files
- name: Run unit tests
Expand Down

0 comments on commit 85c98f3

Please sign in to comment.