Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
CI: add Poetry Venv to PATH (#14554)
Mikail0cb26375de16
diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.ymlindex 5b088ec173..015b7e4a2b 100644--- a/.github/workflows/pytest.yml+++ b/.github/workflows/pytest.yml@@ -20,6 +20,7 @@ on:- Dockerfile- requirements_dev.txt- "saleor/**"+ - ".github/workflows/pytest.yml"- pyproject.toml- poetry.lock@@ -54,7 +55,7 @@ jobs:- name: Install and configure poetryrun: |- python -m pip install poetry==1.5.0+ pip install poetry==1.5.0- name: Cache the venvid: cached-poetry-dependencies@@ -65,20 +66,28 @@ jobs:- name: Install dependenciesrun: |- python -m poetry install --no-root+ poetry env use python3.9+ poetry install --no-rootif: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'+ - name: Add Python Virtual Environment to PATH+ run: |+ # Note: requires `poetry env use` to be ran, otherwise poetry+ # may not be able to find which virtual environment is in use.+ # Ticket: https://github.com/python-poetry/poetry/issues/7190+ echo "$(poetry env info -p)"/bin >> $GITHUB_PATH+# Run linters and Django related checks# `git config` command is a workaround for https://github.com/actions/runner-images/issues/6775- name: Run Linters and Checksrun: |git config --global --add safe.directory "$GITHUB_WORKSPACE"- python -m poetry run pre-commit run --all+ pre-commit run --allif: ${{ always() }}- name: Run unit testsrun: |- python -m poetry run pytest \+ pytest \-m "not e2e" \--cov \--junitxml=junit/test-results.xml \@@ -118,5 +127,4 @@ jobs:- name: Run E2E testsrun: |- python -m poetry run pytest \- -m "e2e"+ pytest -m "e2e"