-
Notifications
You must be signed in to change notification settings - Fork 21
66 lines (57 loc) · 1.57 KB
/
ci-php.yaml
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
name: CI (PHP)
on:
push:
workflow_dispatch:
concurrency:
group: ci-php-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: Run tests
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php:
- "8.0"
- "8.1"
- "8.2"
- "8.3"
- "8.4"
wpmu:
- "0"
- "1"
wordpress:
- latest
- trunk
services:
mysql:
image: mariadb:latest
env:
MYSQL_ROOT_PASSWORD: root
ports:
- 3306
options: --health-cmd="healthcheck.sh --innodb_initialized" --health-interval=5s --health-timeout=2s --health-retries=3
steps:
- name: Install svn
run: sudo apt-get update && sudo apt-get install -y subversion
- name: Check out source code
uses: actions/[email protected]
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
- name: Install PHP Dependencies
uses: ramsey/[email protected]
- name: Verify MariaDB connection
run: |
while ! mysqladmin ping -h 127.0.0.1 -P ${{ job.services.mysql.ports[3306] }} --silent; do
sleep 1
done
timeout-minutes: 3
- name: Install WP Test Suite
run: ./__tests__/bin/install-wp-tests.sh wordpress_test root root 127.0.0.1:${{ job.services.mysql.ports[3306] }} ${{ matrix.wordpress }}
- name: Run tests
run: vendor/bin/phpunit
env:
WP_MULTISITE: ${{ matrix.wpmu }}