Repository navigation
Bump globals from 17.9.0 to 17.11.0 #1041
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: End-to-End Tests | |
| on: | |
| push: | |
| branches: | |
| - trunk | |
| - 'release/**' | |
| - 'add/setup-e2e-tests' | |
| paths: | |
| - '.github/workflows/e2e-test.yml' | |
| - 'plugins/auto-sizes/**' | |
| - '**/package.json' | |
| - 'package-lock.json' | |
| - 'composer.json' | |
| - 'composer.lock' | |
| pull_request: | |
| paths: | |
| - '.github/workflows/e2e-test.yml' | |
| - 'plugins/auto-sizes/**' | |
| - '**/package.json' | |
| - 'package-lock.json' | |
| - 'composer.json' | |
| - 'composer.lock' | |
| types: | |
| - opened | |
| - reopened | |
| - synchronize | |
| # Cancel previous workflow run groups that have not completed. | |
| concurrency: | |
| # Group workflow runs by workflow name, along with the head branch ref of the pull request | |
| # or otherwise the branch or tag ref. | |
| group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.ref }} | |
| cancel-in-progress: true | |
| # Disable permissions for all available scopes by default. | |
| # Any needed permissions should be configured at the job level. | |
| permissions: {} | |
| jobs: | |
| e2e-test: | |
| name: E2E Tests | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| permissions: | |
| contents: read # Required to clone the repo. | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Setup Node.js (.nvmrc) | |
| uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 | |
| with: | |
| node-version-file: '.nvmrc' | |
| cache: npm | |
| - name: Install npm dependencies | |
| run: npm ci | |
| - name: Build assets | |
| run: npm run build | |
| - name: Install Playwright dependencies | |
| run: npx playwright install chromium --with-deps | |
| - name: Install WordPress | |
| run: npm run wp-env-test start | |
| - name: Run tests | |
| env: | |
| PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1 | |
| run: npm run test-e2e |