VCST-4552: Add workflow using Docker test environment #327
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: E2E Tests | |
| on: | |
| push: | |
| branches: [dev] | |
| pull_request: | |
| branches: [dev] | |
| jobs: | |
| e2e-tests: | |
| timeout-minutes: 60 | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| browser: [webkit] #chromium, firefox | |
| env: | |
| FRONTEND_BASE_URL: https://vcptcore-demo-storefront.govirto.com | |
| BACKEND_BASE_URL: https://vcptcore-demo.govirto.com | |
| ADMIN_USERNAME: ${{ secrets.ADMIN_USERNAME }} | |
| ADMIN_PASSWORD: ${{ secrets.ADMIN_PASSWORD }} | |
| USERS_PASSWORD: ${{ secrets.USERS_PASSWORD }} | |
| STORE_ID: store-acme | |
| PLAYWRIGHT_HEADLESS: "true" | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.13.7" | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| pip install pytest-html | |
| - name: Install Playwright Browsers | |
| run: playwright install --with-deps ${{ matrix.browser }} | |
| - name: Run E2E Tests | |
| run: | | |
| echo "Running E2E tests against ${{ env.FRONTEND_BASE_URL }}" | |
| pytest tests_e2e/tests/ -v -s --checkout-mode single-page --product-quantity-control stepper -m "not ignore" --browser ${{ matrix.browser }} --html=e2e-report.html --self-contained-html --tracing=retain-on-failure | |
| - name: Upload test results | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: e2e-test-results-${{ matrix.browser }} | |
| path: | | |
| e2e-report.html | |
| playwright-report/ | |
| test-results/ | |
| retention-days: 30 |