Skip to content

Add e2e test

Add e2e test #142167

on:
pull_request_target:
types: [opened]
push:
name: Pull request automation
jobs:
pull-request-automation:
runs-on: ubuntu-latest
if: ${{ github.repository == 'WordPress/gutenberg' }}
steps:
# Checkout defaults to using the branch which triggered the event, which
# isn't necessarily `trunk` (e.g. in the case of a merge).
- uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3
with:
ref: trunk
show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}
- name: Use desired version of Node.js
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version-file: '.nvmrc'
check-latest: true
- name: Cache NPM packages
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-node-${{ matrix.node }}-npm-pr-automation-cache-${{ hashFiles('**/package-lock.json') }}
# Changing into the action's directory and running `npm install` is much
# faster than a full project-wide `npm ci`.
- name: Install NPM dependencies
run: npm install
working-directory: packages/project-management-automation
- uses: ./packages/project-management-automation
with:
github_token: ${{ secrets.GITHUB_TOKEN }}