-
Notifications
You must be signed in to change notification settings - Fork 101
80 lines (74 loc) · 2.85 KB
/
ci.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
name: CI
on:
push:
branches:
- develop
- staging
- production
- gh-readonly-queue/**
pull_request:
branches:
- develop
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
unit-tests:
name: "WP ${{ matrix.config.wp }}, multisite: ${{ matrix.config.ms }}, JP: ${{ matrix.config.jp }}, PHP: ${{ matrix.config.php }}"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
config:
# PHP 8.1, Jetpack
- { wp: 6.0.x, ms: 'no', jp: 'yes', php: '8.1', phpunit: '' }
- { wp: 6.0.x, ms: 'yes', jp: 'yes', php: '8.1', phpunit: '' }
- { wp: 6.1.x, ms: 'no', jp: 'yes', php: '8.1', phpunit: '' }
- { wp: 6.1.x, ms: 'yes', jp: 'yes', php: '8.1', phpunit: '' }
- { wp: 6.2.x, ms: 'no', jp: 'yes', php: '8.1', phpunit: '' }
- { wp: 6.2.x, ms: 'yes', jp: 'yes', php: '8.1', phpunit: '' }
- { wp: 6.3.x, ms: 'no', jp: 'yes', php: '8.1', phpunit: '' }
- { wp: 6.3.x, ms: 'yes', jp: 'yes', php: '8.1', phpunit: '' }
- { wp: latest, ms: 'no', jp: 'yes', php: '8.1', phpunit: '', coverage: 'yes' }
- { wp: latest, ms: 'yes', jp: 'yes', php: '8.1', phpunit: '', coverage: 'yes' }
- { wp: nightly, ms: 'no', jp: 'yes', php: '8.1', phpunit: '' }
- { wp: nightly, ms: 'yes', jp: 'yes', php: '8.1', phpunit: '' }
# No Jetpack, WP latest, PHP 8.1
- { wp: latest, ms: 'no', jp: 'no', php: '8.1', phpunit: '' }
- { wp: latest, ms: 'yes', jp: 'no', php: '8.1', phpunit: '' }
# PHP 8.2, Jetpack
- { wp: nightly, ms: 'no', jp: 'yes', php: '8.2', phpunit: '' }
- { wp: nightly, ms: 'yes', jp: 'yes', php: '8.2', phpunit: '' }
# PHP 8.3, Jetpack
- { wp: nightly, ms: 'no', jp: 'yes', php: '8.3', phpunit: '' }
- { wp: nightly, ms: 'yes', jp: 'yes', php: '8.3', phpunit: '' }
services:
mysql:
image: mysql:8
ports:
- "3306:3306"
env:
MYSQL_ROOT_PASSWORD: wordpress
MYSQL_INITDB_SKIP_TZINFO: 1
MYSQL_USER: wordpress
MYSQL_PASSWORD: wordpress
MYSQL_DATABASE: wordpress_test
steps:
- name: Check out source code
uses: actions/[email protected]
with:
submodules: recursive
- name: Prepare source code
uses: ./.github/actions/prepare-source
- name: Run tests
uses: ./.github/actions/run-wp-tests
with:
wordpress: ${{ matrix.config.wp }}
multisite: ${{ matrix.config.ms }}
jetpack: ${{ matrix.config.jp }}
php: ${{ matrix.config.php }}
phpunit: ${{ matrix.config.phpunit }}
coverage: ${{ matrix.config.coverage }}