-
Notifications
You must be signed in to change notification settings - Fork 6
101 lines (88 loc) · 2.6 KB
/
Copy pathphpunit.yml
File metadata and controls
101 lines (88 loc) · 2.6 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
name: PHPUnit
on:
push:
pull_request:
schedule:
- cron: '0 4 * * 1'
workflow_dispatch:
permissions:
contents: read
env:
WP_TESTS_DOMAIN: localhost
WP_TESTS_EMAIL: admin@example.com
WP_TESTS_TITLE: PHPUnit
WP_PHP_BINARY: php
WP_TESTS_DIR: /tmp/wordpress-tests-lib
WP_CORE_DIR: /tmp/wordpress
jobs:
test:
name: PHP ${{ matrix.php }}
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.php == '8.6' }}
strategy:
fail-fast: false
matrix:
php: ['7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5', '8.6']
services:
mysql:
image: mysql:8.4
env:
MYSQL_ROOT_PASSWORD: root
ports:
- 3306:3306
options: >-
--health-cmd="mysqladmin ping -h 127.0.0.1 -uroot -proot"
--health-interval=10s
--health-timeout=5s
--health-retries=10
steps:
- name: Check out repository
uses: actions/checkout@v5
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: gd, exif, intl, mbstring, mysqli, xml, zip
tools: composer
coverage: none
cache: composer
- name: Install Composer dependencies
run: composer install --no-interaction --prefer-dist --no-progress
- name: Install WordPress test suite
run: bash phpunit/install.sh wordpress_test root root 127.0.0.1:3306 7.1
- name: Run PHPUnit
run: composer phpunit
trunk:
name: WordPress trunk / PHP 8.5
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
continue-on-error: true
services:
mysql:
image: mysql:8.4
env:
MYSQL_ROOT_PASSWORD: root
ports:
- 3306:3306
options: >-
--health-cmd="mysqladmin ping -h 127.0.0.1 -uroot -proot"
--health-interval=10s
--health-timeout=5s
--health-retries=10
steps:
- name: Check out repository
uses: actions/checkout@v5
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.5'
extensions: gd, exif, intl, mbstring, mysqli, xml, zip
tools: composer
coverage: none
cache: composer
- name: Install Composer dependencies
run: composer install --no-interaction --prefer-dist --no-progress
- name: Install WordPress test suite
run: bash phpunit/install.sh wordpress_test root root 127.0.0.1:3306 trunk
- name: Run PHPUnit
run: composer phpunit