-
Notifications
You must be signed in to change notification settings - Fork 11
61 lines (50 loc) · 1.7 KB
/
Copy pathphpunit.yml
File metadata and controls
61 lines (50 loc) · 1.7 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
name: PHPUnit
on: pull_request
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
# Alias 'master' to 'latest'
name: WP ${{ matrix.wp == 'master' && 'latest' || matrix.wp }} and PHP ${{ matrix.php }}
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.allowed_failure }}
strategy:
fail-fast: false
matrix:
include:
# Check lowest supported WP version, with the lowest supported PHP.
- php: "8.1"
wp: "6.0"
allowed_failure: false
# Check latest WP with the lowest supported PHP.
- php: "8.1"
wp: "master"
allowed_failure: false
# Check latest WP with the highest supported PHP.
- php: "8.3"
wp: "master"
allowed_failure: false
steps:
- name: Checkout code
uses: actions/checkout@v7
- name: Install wordpress environment
run: npm -g install @wordpress/env
- name: Setup PHP ${{ matrix.php }}
uses: shivammathur/setup-php@7c071dfe9dc99bdf297fa79cb49ea005b9fcadbc # 2.37.1
with:
php-version: ${{ matrix.php }}
tools: composer
- name: Install Composer dependencies
uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0
with:
composer-options: --prefer-dist --no-progress
- name: Setup wp-env
run: wp-env start
env:
WP_ENV_CORE: WordPress/WordPress#${{ matrix.wp }}
WP_ENV_PHP_VERSION: ${{ matrix.php }}
- name: PHPUnit
run: composer test
- name: PHPUnit multisite
run: composer run-script test-multisite