Merge branch 'main' into upgrade-to-node-18 #4884
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: 15 | |
strategy: | |
fail-fast: false | |
matrix: | |
project: | |
[ | |
'Desktop Chrome', | |
'Desktop Firefox', | |
'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: | |
FONT_AWESOME_NPM_TOKEN: ${{ secrets.FONT_AWESOME_NPM_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 }} | |
- name: Run Playwright Tests | |
env: | |
NODE_ENV: test | |
NEXT_PUBLIC_STRAPI_ORIGIN: http://localhost:1337 | |
ALGOLIA_API_KEY: ${{ secrets.ALGOLIA_API_KEY }} | |
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 |