-
Notifications
You must be signed in to change notification settings - Fork 4
51 lines (41 loc) · 1.17 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
42
43
44
45
46
47
48
49
50
51
name: PHPUnit
on: pull_request
jobs:
phpunit:
name: PHPUnit (PHP ${{ matrix.php }} with WordPress ${{ matrix.wordpress }})
runs-on: ubuntu-latest
env:
WP_DB_HOST: 127.0.0.1
WP_DB_NAME: local
WP_DB_USER: root
WP_DB_PASS: ""
services:
mysql:
image: mysql:5.7
env:
MYSQL_ALLOW_EMPTY_PASSWORD: yes
MYSQL_DATABASE: local
MYSQL_ROOT_PASSWORD: root
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
strategy:
fail-fast: false
matrix:
php: ['7.4']
wordpress: ['trunk']
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: none
tools: composer, cs2pr
- name: Composer Install
uses: ramsey/composer-install@v1
- name: Setup problem matchers for PHPUnit
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
- name: Run tests
run: composer run test