Instead of deriving variant from url get it from algolia filters. #6516
Workflow file for this run
This file contains 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] | |
env: | |
npm_config_userconfig: './.npmrc' | |
jobs: | |
playwright-run: | |
timeout-minutes: 20 | |
strategy: | |
fail-fast: false | |
matrix: | |
project: ['Desktop Chrome', 'Mobile Chrome', 'Tablet Chrome'] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- name: Start strapi server | |
run: cd backend && docker-compose up -d | |
env: | |
JWT_SECRET: 'ci-secret' | |
API_TOKEN_SALT: 'Not_A-s3Cr3t-/Qr5iGP0g==' | |
- name: Setup and cache pnpm | |
uses: ./.github/actions/pnpm-setup | |
- name: Install workspaces | |
env: | |
VERDACCIO_AUTH_TOKEN: ${{ secrets.VERDACCIO_AUTH_TOKEN }} | |
run: pnpm install | |
- name: Setup and cache playwright dependencies | |
uses: ./.github/actions/playwright-setup | |
- name: Build and cache frontend for with test setup | |
uses: ./.github/actions/build-test-frontend | |
with: | |
ALGOLIA_API_KEY: ${{ secrets.ALGOLIA_API_KEY }} | |
NEXT_PUBLIC_DEV_API_AUTH_TOKEN: ${{ secrets.NEXT_PUBLIC_DEV_API_AUTH_TOKEN }} | |
- name: Run Playwright Tests | |
env: | |
NODE_ENV: test | |
ALGOLIA_API_KEY: ${{ secrets.ALGOLIA_API_KEY }} | |
NEXT_PUBLIC_DEV_API_AUTH_TOKEN: ${{ secrets.NEXT_PUBLIC_DEV_API_AUTH_TOKEN }} | |
run: cd frontend && pnpm playwright:run --project="${{ matrix.project }}" | |
- uses: actions/upload-artifact@v3 | |
if: failure() | |
with: | |
name: playwright-artifacts | |
path: frontend/tests/playwright/test-results/artifacts | |
retention-days: 7 |