-
Notifications
You must be signed in to change notification settings - Fork 1
81 lines (63 loc) · 1.65 KB
/
test.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: Automated Testing
on:
push:
branches:
- master
pull_request:
jobs:
phpcs:
name: PHP Linting
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.2'
coverage: none
tools: composer:v2
- name: Install Composer Dependencies
run: composer install
- name: Lint Coding Standards
run: composer run phpcs
phpstan:
name: Static Analysis
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.2'
coverage: none
tools: composer:v2
- name: Install Composer Dependencies
run: composer install
- name: Static Analysis
run: composer run phpstan
cypress:
name: ${{ matrix.core.name }}
runs-on: ubuntu-latest
needs: [phpcs,phpstan]
strategy:
matrix:
core:
- {name: 'WordPress Latest', version: 'latest'}
- {name: 'WordPress Minimum', version: 'WordPress/WordPress#5.0'}
- {name: 'WordPress Trunk', version: 'WordPress/WordPress#master'}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install dependencies
run: npm install
- name: Composer
run: composer install
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: e2e Test
run: npm run cypress:run