Skip to content

npm(deps-dev): bump @playwright/test from 1.57.0 to 1.58.0 #34

npm(deps-dev): bump @playwright/test from 1.57.0 to 1.58.0

npm(deps-dev): bump @playwright/test from 1.57.0 to 1.58.0 #34

Workflow file for this run

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:
build:
name: Build
runs-on: ubuntu-latest
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@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.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: Upload build artifacts
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: build-artifacts
path: build/
retention-days: 1
test:
name: 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
needs: build
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@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
with:
node-version: '20'
cache: npm
- name: Install dependencies
run: npm ci
- name: Download build artifacts
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
with:
name: build-artifacts
path: build/
- name: Install Playwright browsers and system dependencies
run: npx playwright install --with-deps chromium
- name: Install WordPress with wp-env
run: npm run wp-env start
- name: Run E2E tests
run: npm run test-e2e