-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (38 loc) · 1.4 KB
/
cypress-e2e-tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: Cypress E2E Tests
on:
pull_request:
types: [opened, synchronize, ready_for_review]
workflow_dispatch:
jobs:
cypress_e2e_tests:
name: Cypress End 2 End Tests
runs-on: ubuntu-latest
if: ${{ github.repository == 'publisherwp/publisher-core' || github.event_name == 'pull_request' }}
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Setup SSH
uses: MrSquaare/ssh-setup-action@v1
with:
host: github.com
private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Clone Submodule
run: |
cd libs
git clone [email protected]:publisherwp/storybook.git
- name: Setup Node.js and install dependencies
uses: ./.github/setup-node
- name: Install Composer Packages
run: composer install
- name: Build wp-env app
run: npm run build:wp-env-app
- name: Start WordPress Environment
run: |
npm run env:start
npm run plugin:activate
- name: Wait for WordPress to Start
run: sleep 40
- name: Run Cypress E2E Tests
run: npm run test:e2e
- name: Stop WordPress Environment
run: npm run env:stop