New Crowdin updates #5840
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: Playwright Tests | |
| on: | |
| push: | |
| branches: [main, beta] | |
| pull_request: | |
| branches: [main, beta] | |
| types: [opened, reopened, synchronize, review_requested, ready_for_review] | |
| jobs: | |
| test: | |
| if: github.event.pull_request.draft == false | |
| timeout-minutes: 20 | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| - name: Install dependencies | |
| run: npm ci | |
| # Cache Playwright browser binaries | |
| - uses: actions/cache@v4 | |
| id: playwright-cache | |
| with: | |
| path: ~/.cache/ms-playwright | |
| key: playwright-${{ hashFiles('package-lock.json') }} | |
| # System deps must always be installed (apt packages are not cached) | |
| - name: Install Playwright system dependencies | |
| run: npx playwright install-deps chromium-headless-shell | |
| # Browser binaries are cached — only download on cache miss | |
| - name: Install Playwright browsers | |
| if: steps.playwright-cache.outputs.cache-hit != 'true' | |
| run: npx playwright install chromium-headless-shell | |
| # Build before tests — fails fast with clear error on build failure | |
| - name: Build | |
| run: npm run build | |
| - name: Run Playwright tests | |
| run: npx playwright test --config tests/playwright.config.ts | |
| - uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: playwright-report | |
| path: playwright-report/ | |
| retention-days: 30 |