-
-
Notifications
You must be signed in to change notification settings - Fork 278
83 lines (73 loc) · 2.12 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
82
83
name: Timber starter theme tests
on:
push:
branches:
- '1.x'
- '2.x'
pull_request:
types:
- opened
- synchronize
- ready_for_review
# Cancel previous workflow run groups that have not completed.
concurrency:
# Group workflow runs by workflow name, along with the head branch ref of the pull request
# or otherwise the branch or tag ref.
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
phpunit:
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.experimental }}
strategy:
fail-fast: false
matrix:
php: ['7.4', '8.0', '8.1']
wp: ['latest']
multisite: ['0', '1']
extensions: ['gd']
experimental: [false]
include:
# WP Trunk
- php: '7.4'
wp: 'trunk'
multisite: '0'
experimental: true
# PHP 8.0
- php: '8.0'
wp: 'latest'
multisite: '0'
experimental: false
# PHP 8.1
- php: '8.1'
wp: 'latest'
multisite: '0'
experimental: false
# PHP 8.1 / experimental
- php: '8.1'
wp: 'trunk'
multisite: '0'
experimental: true
# PHP 8.2 / experimental
- php: '8.2'
wp: 'trunk'
multisite: '0'
experimental: true
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: composer:v2
extensions: curl, date, dom, iconv, json, libxml, gd
- name: Setup problem matchers for PHP
run: echo "::add-matcher::${{ runner.tool_cache }}/php.json"
- name: Setup problem matchers for PHPUnit
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
- uses: ramsey/composer-install@v2
- name: Run tests
run: composer run test
env:
WP_MULTISITE: ${{ matrix.multisite }}