name: Tests on: push: branches: - main pull_request: # Cancel superseded runs on the same branch / PR to save CI minutes. concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: test: runs-on: ubuntu-latest permissions: contents: read steps: - name: Checkout uses: actions/checkout@v4.2.2 with: persist-credentials: false - name: Setup Node uses: actions/setup-node@v4 with: node-version: 24 cache: npm - name: Install dependencies run: npm ci - name: Get Playwright version id: playwright-version run: echo "version=$(npx playwright --version | awk '{print $2}')" >> "$GITHUB_OUTPUT" - name: Cache Playwright browsers uses: actions/cache@v4 with: path: ~/.cache/ms-playwright key: playwright-${{ runner.os }}-${{ steps.playwright-version.outputs.version }} - name: Install Playwright Chromium run: npx playwright install --with-deps chromium - name: Type check run: npm run check - name: Run tests run: npm test