Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Adding gh workflow for e2e tests (#15262)
Renata58b076a4f05c
diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.ymlnew file mode 100644index 0000000000..569832617d--- /dev/null+++ b/.github/workflows/e2e.yml@@ -0,0 +1,76 @@+name: e2e suite++on:+ workflow_dispatch:+ schedule:+ # At 2:00 AM UTC on Monday, Wednesday, and Friday+ - cron: "00 2 * * 1,3,5"+ pull_request:+ branches:+ - 'main'++env:+ DATABASE_URL: "postgres://saleor:saleor@postgres:5432/saleor"+ SECRET_KEY: ci-test++jobs:+ build:+ runs-on: ubuntu-22.04+ container: python:3.9++ services:+ postgres:+ image: postgres+ env:+ POSTGRES_PASSWORD: saleor+ POSTGRES_USER: saleor+ options: >-+ --health-cmd pg_isready+ --health-interval 10s+ --health-timeout 5s+ --health-retries 5++ steps:+ - uses: actions/checkout@v4++ - name: Install system dependencies+ run: |+ apt-get install -y libpq-dev++ - name: Install and configure poetry+ run: |+ pip install poetry==1.7.0++ - name: Cache the venv+ id: cached-poetry-dependencies+ uses: actions/cache@v4+ with:+ path: ~/.cache/pypoetry/virtualenvs+ key: ${{ runner.os }}-venv-${{ hashFiles('**/poetry.lock') }}++ - name: Install dependencies+ run: |+ poetry env use python3.9+ poetry install --no-root+ if: 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++ - name: Run E2E tests+ run: |+ pytest -m "e2e"+ pytest --junit-xml=e2e-test-results.xml+ - name: Surface failing tests+ if: always()+ uses: pmeier/pytest-results-action@4c22f3314dfc484aaad53353d3dd8dddf5de6b46 # v0.5.0+ with:+ path: e2e-test-results.xml+ summary: true+ display-options: fEX+ fail-on-empty: true+ title: E2E core test results