-
Notifications
You must be signed in to change notification settings - Fork 2
70 lines (61 loc) · 1.85 KB
/
integration-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
name: 'Integration Test'
on:
push:
branches: [main, develop, release, release/*]
tags: [ test, phpunit ]
pull_request:
branches: [main, develop, release, release/*]
schedule:
- cron: "0 0 * * *"
jobs:
PHPUnit:
runs-on: ubuntu-latest
strategy:
matrix:
php-versions: ['7.1', '7.0', '5.6']
include:
- php-versions: '7.1'
wp-version: 'latest'
- php-versions: '7.0'
wp-version: 'latest'
- php-versions: '5.6'
wp-version: '4.4'
- php-versions: '5.6'
wp-version: 'latest'
- php-versions: '5.6'
wp-version: 'trunk'
services:
mysql:
image: mysql:5.7
env:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: wordpress_test
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
steps:
- uses: actions/checkout@v2
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
coverage: none
- name: Cache Composer dependencies
uses: actions/cache@v2
with:
path: ${{ github.workspace }}/vendor
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-
- name: Install dependencies
run: |
composer install --prefer-dist --no-progress --no-suggest
- name: Prepare for Test Suite
if: matrix.wp-version != ''
run: |
bash bin/install-wp-tests.sh wordpress_test root 'password' 127.0.0.1 ${{ matrix.wp-version }}
composer global require "phpunit/phpunit=4.8.*|5.7.*"
- name: Run PHPUnit Tests
if: matrix.wp-version != ''
run: |
phpunit
WP_MULTISITE=1 phpunit