Skip to content

Commit

Permalink
Merge pull request #288 from 10up/e2e-tests
Browse files Browse the repository at this point in the history
E2e tests
  • Loading branch information
oscarssanchez committed Oct 4, 2022
2 parents 8af718a + c437e18 commit 5b84e23
Show file tree
Hide file tree
Showing 13 changed files with 259 additions and 14,347 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/cypress.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: E2E test

env:
NODE_VERSION: "12"

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'}
steps:
- name: Install node
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
- name: Checkout
uses: actions/checkout@v3
- name: Install dependencies
run: npm install
- name: Composer (optional)
run: composer install
continue-on-error: true
- name: Build (optional)
run: 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
10 changes: 10 additions & 0 deletions .wp-env.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"plugins": ["."],
"env": {
"tests": {
"mappings": {
"wp-cli.yml": "./tests/bin/wp-cli.yml"
}
}
}
}
Loading

0 comments on commit 5b84e23

Please sign in to comment.