-
Notifications
You must be signed in to change notification settings - Fork 101
87 lines (81 loc) · 3.24 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
81
82
83
84
85
86
87
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:
# Jetpack, Single-Site, PHP 7.4
- { wp: 5.8.x, ms: 'no', jp: 'yes', php: '7.4', phpunit: 7 }
- { wp: 5.9.x, ms: 'no', jp: 'yes', php: '7.4', phpunit: 7 }
- { wp: 6.0.x, ms: 'no', jp: 'yes', php: '7.4', phpunit: 7 }
- { wp: 6.1.x, ms: 'no', jp: 'yes', php: '7.4', phpunit: 7 }
- { wp: latest, ms: 'no', jp: 'yes', php: '7.4', phpunit: 7 }
- { wp: nightly, ms: 'no', jp: 'yes', php: '7.4', phpunit: 7 }
# Jetpack, Multi-Site, PHP 7.4
- { wp: latest, ms: 'yes', jp: 'yes', php: '7.4', phpunit: 7 }
- { wp: nightly, ms: 'yes', jp: 'yes', php: '7.4', phpunit: 7 }
# No Jetpack, WP latest, PHP 7.4
- { wp: latest, ms: 'no', jp: 'no', php: '7.4', phpunit: 7 }
- { wp: latest, ms: 'yes', jp: 'no', php: '7.4', phpunit: 7 }
# PHP 8.0, Jetpack
- { wp: 6.2.x, ms: 'no', jp: 'yes', php: '8.0', phpunit: '' }
- { wp: 6.2.x, ms: 'yes', jp: 'yes', php: '8.0', phpunit: '' }
- { wp: latest, ms: 'no', jp: 'yes', php: '8.0', phpunit: '', coverage: 'yes' }
- { wp: latest, ms: 'yes', jp: 'yes', php: '8.0', phpunit: '', coverage: 'yes' }
- { wp: nightly, ms: 'no', jp: 'yes', php: '8.0', phpunit: '' }
- { wp: nightly, ms: 'yes', jp: 'yes', php: '8.0', phpunit: '' }
# PHP 8.1, Jetpack
- { wp: latest, ms: 'no', jp: 'yes', php: '8.1', phpunit: '' }
- { wp: latest, ms: 'yes', jp: 'yes', 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 }}