Skip to content

Commit

Permalink
try custom cypress action
Browse files Browse the repository at this point in the history
  • Loading branch information
Sidsector9 committed Jul 9, 2024
1 parent ae48fa1 commit 4352ecd
Showing 1 changed file with 57 additions and 0 deletions.
57 changes: 57 additions & 0 deletions .github/workflows/cypress-actions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
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 latest', version: 'latest'}
- {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-wp-config.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

0 comments on commit 4352ecd

Please sign in to comment.