Skip to content
This repository was archived by the owner on Jul 10, 2023. It is now read-only.

Commit

Permalink
Add wp-env for e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
swissspidy committed Mar 28, 2022
1 parent fd6c864 commit d42b3d5
Showing 7 changed files with 2,078 additions and 33 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/e2e-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: E2E Tests

on:
push:
branches:
- main
pull_request:

jobs:
e2e-tests:
name: E2E Tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 15
cache: npm

- name: Install dependencies
run: npm ci

- name: Build plugin
run: npm run build

- name: Install WordPress
run: |
chmod -R 767 ./ # TODO: Possibly integrate in wp-env
npm run wp-env start
- name: Run tests
run: npm run test:e2e -- --runInBand

- name: Archive debug artifacts (screenshots, HTML snapshots)
uses: actions/upload-artifact@v3
if: always()
with:
name: failures-artifacts
path: artifacts
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
artifacts/
build/
node_modules/
vendor/
6 changes: 6 additions & 0 deletions .wp-env.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"core": null,
"plugins": [
"."
]
}
Loading

0 comments on commit d42b3d5

Please sign in to comment.