E2E Tests #89
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: [main, develop] | |
| schedule: | |
| - cron: '0 2 * * *' | |
| jobs: | |
| e2e-main: | |
| if: github.event_name == 'push' | |
| name: E2E (chromium) | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| env: | |
| E2E_COVERAGE: '1' | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 20 | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Install Playwright Browsers | |
| run: npx playwright install --with-deps chromium | |
| - name: Build packages | |
| run: npm run build | |
| - name: Run E2E tests | |
| run: npx playwright test --project=chromium | |
| - name: Merge E2E coverage | |
| run: node scripts/merge-e2e-coverage.js | |
| - name: Upload E2E coverage to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: ./coverage-e2e/lcov.info | |
| flags: e2e | |
| fail_ci_if_error: false | |
| - name: Upload report | |
| if: always() | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: playwright-report-chromium | |
| path: playwright-report/ | |
| retention-days: 7 | |
| e2e-nightly: | |
| if: github.event_name == 'schedule' | |
| name: E2E (${{ matrix.browser }}) | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 45 | |
| strategy: | |
| matrix: | |
| browser: [chromium, firefox, webkit] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 20 | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Install Playwright Browsers | |
| run: npx playwright install --with-deps ${{ matrix.browser }} | |
| - name: Build packages | |
| run: npm run build | |
| - name: Run E2E tests | |
| run: npx playwright test --project=${{ matrix.browser }} | |
| - name: Upload report | |
| if: always() | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: playwright-report-${{ matrix.browser }} | |
| path: playwright-report/ | |
| retention-days: 7 |