Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add E2E testing using Cypress #117

Merged
merged 18 commits into from
Oct 7, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions .github/workflows/test-branch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Test Branch

on:
push:
branches:
- trunk
- develop

jobs:
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#4.6.0'}

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Install dependencies
run: npm i

- name: Build asset
run: npm run build

- name: Set the core version
run: ./tests/bin/set-core-version.js ${{ matrix.core.version }}

- name: Set up WP environment
run: npm run wp-env start

- name: Test
run: npm run cypress:run
34 changes: 34 additions & 0 deletions .github/workflows/test-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Test

on:
pull_request:
branches:
- develop

jobs:
cypress:
runs-on: ubuntu-latest

strategy:
matrix:
core:
- {name: 'WP latest', version: 'latest'}

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Install dependencies
run: npm i

- name: Build asset
run: npm run build

- name: Set the core version
run: ./tests/bin/set-core-version.js ${{ matrix.core.version }}

- name: Set up WP environment
run: npm run wp-env start

- name: Test
run: npm run cypress:run
30 changes: 0 additions & 30 deletions .github/workflows/test.yml

This file was deleted.

4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ vendor
composer.lock
phpunit.xml
.idea
package-lock.json

# Project Files
dist
Expand Down Expand Up @@ -34,3 +33,6 @@ Desktop.ini

# E2E testing
artifacts
tests/cypress/downloads
tests/cypress/screenshots
tests/cypress/videos
Loading