Skip to content

Converge the identity of the server and the browser #53

Converge the identity of the server and the browser

Converge the identity of the server and the browser #53

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