Repository navigation
Converge the identity of the server and the browser #53
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: Validate branch | |
| on: | |
| push: | |
| tags-ignore: | |
| - '**' | |
| branches: | |
| - master | |
| pull_request: | |
| types: | |
| - synchronize | |
| - opened | |
| jobs: | |
| validate: | |
| uses: croct-tech/shared-public-configs/.github/workflows/javascript-validations.yml@master | |
| with: | |
| node-version: '22' | |
| use-private-registry: false | |
| e2e: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: npm | |
| - run: npm ci | |
| - run: npm run build | |
| - name: Get Playwright version | |
| id: playwright-version | |
| run: echo "version=$(npx playwright --version | awk '{print $2}')" >> "$GITHUB_OUTPUT" | |
| - name: Cache Playwright browsers | |
| id: playwright-cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache/ms-playwright | |
| key: playwright-${{ steps.playwright-version.outputs.version }} | |
| - name: Install Playwright browsers | |
| if: steps.playwright-cache.outputs.cache-hit != 'true' | |
| run: npx playwright install --with-deps chromium | |
| - name: Install Playwright system dependencies | |
| if: steps.playwright-cache.outputs.cache-hit == 'true' | |
| run: npx playwright install-deps chromium | |
| - name: Run e2e tests | |
| run: npx playwright test | |
| - name: Run prerendering e2e tests | |
| run: npx playwright test -c playwright.prerender.config.ts |