npm(deps-dev): Bump the dev-dependencies group with 10 updates #5
Workflow file for this run
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: | |
| paths: | |
| - '**.js' | |
| - '**.jsx' | |
| - '**.ts' | |
| - '**.tsx' | |
| - '**.scss' | |
| - '**.css' | |
| - 'package.json' | |
| - 'package-lock.json' | |
| - 'webpack.config.js' | |
| - '.wp-env.json' | |
| - 'tests/e2e/**' | |
| - '.github/workflows/e2e-tests.yml' | |
| pull_request: | |
| branches: [develop, main] | |
| paths: | |
| - '**.js' | |
| - '**.jsx' | |
| - '**.ts' | |
| - '**.tsx' | |
| - '**.scss' | |
| - '**.css' | |
| - 'package.json' | |
| - 'package-lock.json' | |
| - 'webpack.config.js' | |
| - '.wp-env.json' | |
| - 'tests/e2e/**' | |
| - '.github/workflows/e2e-tests.yml' | |
| workflow_dispatch: | |
| # Disable all permissions by default; grant minimal permissions per job | |
| permissions: {} | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| test: | |
| name: Build and E2E Tests | |
| # Pin to ubuntu-22.04 for Playwright compatibility | |
| # ubuntu-latest (24.04) has library version mismatches with Playwright's WebKit dependencies | |
| runs-on: ubuntu-22.04 | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| persist-credentials: false | |
| - name: Set up NodeJS 20 | |
| uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 | |
| with: | |
| node-version: '20' | |
| cache: npm | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build assets | |
| run: npm run build | |
| - name: Verify built assets exist | |
| run: | | |
| echo "Checking custom-status assets..." | |
| test -f build/custom-status-block.js || (echo "Missing: build/custom-status-block.js" && exit 1) | |
| test -f build/custom-status-block.css || (echo "Missing: build/custom-status-block.css" && exit 1) | |
| echo "Checking calendar assets..." | |
| test -f build/calendar-react.js || (echo "Missing: build/calendar-react.js" && exit 1) | |
| test -f build/calendar-react.css || (echo "Missing: build/calendar-react.css" && exit 1) | |
| echo "All expected assets present!" | |
| - name: Report asset sizes | |
| run: | | |
| echo "### Asset Sizes" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo "| File | Size |" >> $GITHUB_STEP_SUMMARY | |
| echo "|------|------|" >> $GITHUB_STEP_SUMMARY | |
| echo "| custom-status-block.js | $(du -h build/custom-status-block.js | cut -f1) |" >> $GITHUB_STEP_SUMMARY | |
| echo "| calendar-react.js | $(du -h build/calendar-react.js | cut -f1) |" >> $GITHUB_STEP_SUMMARY | |
| - name: Resolve Playwright version | |
| id: playwright-version | |
| run: | | |
| version=$(node -p "require('@playwright/test/package.json').version") | |
| echo "version=${version}" >> "$GITHUB_OUTPUT" | |
| - name: Cache Playwright browsers | |
| id: playwright-cache | |
| uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 | |
| with: | |
| path: ~/.cache/ms-playwright | |
| key: playwright-${{ runner.os }}-${{ steps.playwright-version.outputs.version }} | |
| - name: Install Playwright browsers and system dependencies | |
| 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: Install WordPress with wp-env | |
| run: npm run wp-env start | |
| - name: Run E2E tests | |
| run: npm run test-e2e |