Merge pull request #184 from GaryJones/patch-1 #166
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 test | |
on: | |
push: | |
branches: | |
- develop | |
- trunk | |
pull_request: | |
branches: | |
- develop | |
jobs: | |
cypress: | |
name: ${{ matrix.core.name }} | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
core: | |
- {name: 'WP latest', version: 'latest', continue: false} | |
- {name: 'WP minimum', version: 'WordPress/WordPress#6.4', continue: false} | |
- {name: 'WP trunk', version: 'WordPress/WordPress#master', continue: true} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install dependencies | |
run: npm ci | |
- name: Composer (optional) | |
run: composer install | |
continue-on-error: true | |
- uses: actions/setup-node@v4 | |
with: | |
node-version-file: '.nvmrc' | |
- name: Build (optional) | |
run: npm ci && npm run build | |
continue-on-error: true | |
- name: Set the core version | |
run: ./tests/bin/set-core-version.js ${{ matrix.core.version }} | |
- name: Set up WP environment | |
run: npm run env:start | |
- name: Test | |
run: npm run cypress:run | |
continue-on-error: ${{ matrix.core.continue }} | |
- name: Make artifacts available | |
uses: actions/upload-artifact@v4 | |
if: failure() | |
with: | |
name: cypress-artifact | |
retention-days: 2 | |
path: | | |
${{ github.workspace }}/tests/cypress/screenshots/ | |
${{ github.workspace }}/tests/cypress/videos/ | |
${{ github.workspace }}/tests/cypress/logs/ | |
${{ github.workspace }}/tests/cypress/reports/ |