-
Notifications
You must be signed in to change notification settings - Fork 6
41 lines (33 loc) · 1.07 KB
/
phpunit.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
name: PHPUnit
on: [push]
env:
WP_TESTS_DIR: /github/home/wp-tests/wordpress-tests-lib
WP_CORE_DIR: /github/home/wp-tests/wordpress
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
php-version: [ 7.4 ]
wordpress-version: [ latest ]
container:
image: junaidbhura/wp-tests:php-${{ matrix.php-version }}
services:
mysql:
image: mysql:5.7.27
env:
MYSQL_ROOT_PASSWORD: root
steps:
- name: Checkout repository
uses: actions/checkout@v1
- name: Install Composer dependencies
run: |
composer install --no-dev
composer global require "phpunit/phpunit=5.7.27"
composer global require "yoast/phpunit-polyfills=1.1.0"
- name: Install WordPress test suite
run: bash bin/install-wp-tests.sh wordpress_test root root mysql ${{ matrix.wordpress-version }}
- name: Tests
run: |
$HOME/.composer/vendor/bin/phpunit --config=phpunit.xml
WP_MULTISITE=1 $HOME/.composer/vendor/bin/phpunit --config=phpunit.xml