-
Notifications
You must be signed in to change notification settings - Fork 0
77 lines (72 loc) · 2.36 KB
/
Copy pathtests.yml
File metadata and controls
77 lines (72 loc) · 2.36 KB
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
name: Tests
on:
push:
branches: [ master ]
pull_request:
jobs:
phpunit:
name: PHP ${{ matrix.php }} / WP latest
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: [ '8.0', '8.2', '8.4' ]
env:
WP_ENV_PHP_VERSION: ${{ matrix.php }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- run: npm install
- run: npx wp-env start
- run: npx wp-env run tests-cli --env-cwd=wp-content/wpify-model composer install --no-interaction
- run: npx wp-env run tests-cli --env-cwd=wp-content/wpify-model vendor/bin/phpunit
multisite:
name: Multisite / PHP 8.2
runs-on: ubuntu-latest
env:
WP_ENV_PHP_VERSION: '8.2'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- run: npm install
- run: npx wp-env start
- run: npx wp-env run tests-cli --env-cwd=wp-content/wpify-model composer install --no-interaction
- run: npx wp-env run tests-cli --env-cwd=wp-content/wpify-model vendor/bin/phpunit -c phpunit-multisite.xml
coverage:
name: Coverage report (informational)
runs-on: ubuntu-latest
env:
WP_ENV_PHP_VERSION: '8.2'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- run: npm install
- run: npx wp-env start --xdebug=coverage
- run: npx wp-env run tests-cli --env-cwd=wp-content/wpify-model composer install --no-interaction
- run: npx wp-env run tests-cli --env-cwd=wp-content/wpify-model vendor/bin/phpunit --coverage-clover coverage.xml --coverage-text
- uses: actions/upload-artifact@v4
with:
name: coverage-clover
path: coverage.xml
nightly:
name: WP nightly (allowed to fail)
runs-on: ubuntu-latest
continue-on-error: true
env:
WP_ENV_PHP_VERSION: '8.4'
WP_ENV_CORE: WordPress/WordPress#master
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- run: npm install
- run: npx wp-env start
- run: npx wp-env run tests-cli --env-cwd=wp-content/wpify-model composer install --no-interaction
- run: npx wp-env run tests-cli --env-cwd=wp-content/wpify-model vendor/bin/phpunit