-
Notifications
You must be signed in to change notification settings - Fork 10
44 lines (34 loc) · 1.19 KB
/
phpunit-tests.yml
File metadata and controls
44 lines (34 loc) · 1.19 KB
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
name: CI - PHPUnit
on:
push:
branches: [develop]
pull_request:
branches: [master, develop]
jobs:
build:
runs-on: ubuntu-latest
name: PHPUnit tests on PHP ${{ matrix.php-version }}
strategy:
matrix:
php-version: ['7.1', '7.2', '7.3', '7.4']
container:
image: junaidbhura/wp-tests:php-${{ matrix.php-version }}
services:
mysql:
image: mysql:5.7
env:
MYSQL_ROOT_PASSWORD: password
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Remove composer.lock
run: rm composer.lock
- name: Validate composer.json
run: composer validate
- name: Install dependencies
run: composer install --prefer-dist --no-progress
- name: Install WordPress
run: bash bin/install-wp-tests.sh wordpress_test root 'password' mysql
- name: Run test suite
run: composer tests