forked from afragen/git-updater
-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (47 loc) · 1.5 KB
/
Copy pathwp-phpunit.yml
File metadata and controls
55 lines (47 loc) · 1.5 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
45
46
47
48
49
50
51
52
53
54
55
# Based on https://github.com/wp-cli/scaffold-command/blob/f9bad3dd7224d5684d950d31c486df70905e386f/templates/plugin-github.mustache
# Thanks Josh https://github.com/Shelob9/wordpress-plugin/blob/main/.github/workflows/wordpress.yml
# Thanks https://github.com/shivammathur
name: WordPress Tests
on:
push:
branches:
- develop
- master
pull_request:
branches:
- develop
- master
jobs:
run:
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
operating-system: [ubuntu-18.04]
php-versions: ['7.2', '7.3', '7.4']
phpunit-versions: ['7.5.20']
include:
- php-versions: '5.6'
phpunit-versions: '5.7.27'
operating-system: ubuntu-16.04
name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
coverage: none
extensions: mysql
tools: wp-cli, phpunit:${{ matrix.phpunit-versions }}
- name: Check PHP Version
run: php -v
- name: Composer install
run: composer install --optimize-autoloader --prefer-dist
- name: Start Mysql
run: sudo service mysql start
- name: Install WP Tests
run: bash bin/install-wp-tests.sh wordpress_test root root localhost latest
- name: phpunit tests
run: phpunit --config=phpunit.xml