try custom cypress action #9
Workflow file for this run
This file contains 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: | |
branches: | |
- cypress-actions | |
jobs: | |
check-diffs: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
cypress: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
core: | |
- {name: 'WP trunk', version: 'WordPress/WordPress#master'} | |
- {name: 'WP minimum', version: 'WordPress/WordPress#6.4'} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set PHP version | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '8.0' | |
coverage: none | |
tools: composer:v2 | |
- name: Install PHP dependencies | |
run: composer i | |
- name: Setup node version and npm cache | |
uses: actions/setup-node@v3 | |
with: | |
node-version-file: '.nvmrc' | |
cache: 'npm' | |
- name: Install Node dependencies | |
if: steps.cache-node-modules.outputs.cache-hit != 'true' | |
run: npm ci --no-optional | |
- name: Set the core version and plugins config | |
run: ./tests/bin/set-core-version.js --core=${{ matrix.core.version }} --plugins=./${{ github.event.repository.name }} | |
- name: Set up WP environment | |
run: npm run env:start | |
- name: Test | |
run: npm run cypress:run |