e2e-tests.yml 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. name: E2E tests
  2. on:
  3. pull_request:
  4. push:
  5. branches:
  6. - main
  7. jobs:
  8. test:
  9. timeout-minutes: 10
  10. runs-on: ubuntu-latest
  11. strategy:
  12. matrix:
  13. shard: [1/3, 2/3, 3/3]
  14. steps:
  15. - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
  16. - run: corepack enable
  17. - uses: actions/setup-node@v3
  18. with:
  19. node-version: 20
  20. cache: 'pnpm'
  21. - name: Get Playwright version
  22. id: playwright-version
  23. run: echo "PLAYWRIGHT_VERSION=$(jq -r .dependencies.playwright package.json)" >> "$GITHUB_OUTPUT"
  24. - name: Install dependencies
  25. run: pnpm install
  26. - name: Build app
  27. run: pnpm build
  28. - name: Restore Playwright browsers from cache
  29. uses: actions/cache@v3
  30. with:
  31. path: ~/.cache/ms-playwright
  32. key: ${{ runner.os }}-playwright-${{ steps.playwright-version.outputs.PLAYWRIGHT_VERSION }}-${{ hashFiles('**/playwright.config.ts') }}
  33. restore-keys: |
  34. ${{ runner.os }}-playwright-${{ steps.playwright-version.outputs.PLAYWRIGHT_VERSION }}-
  35. ${{ runner.os }}-playwright-
  36. - name: Install Playwright Browsers
  37. run: pnpm exec playwright install --with-deps
  38. - name: Run Playwright tests
  39. run: pnpm run test:e2e --shard=${{ matrix.shard }}