forked from elementor/elementor
-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (47 loc) · 1.55 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
name: PHPUnit
on: [push, pull_request]
jobs:
file-diff:
runs-on: ubuntu-18.04
name: File Diff
if: startsWith( github.repository, 'elementor/' )
outputs:
php_diff: ${{ steps.php_diff_files.outputs.diff }}
steps:
- name: Checkout source code
uses: actions/checkout@v2
- name: Check PHP files diff
id: php_diff_files
uses: technote-space/get-diff-action@v4
with:
PATTERNS: |
**/*.php
test:
runs-on: ubuntu-18.04
needs: [ 'file-diff' ]
if: ${{ needs.file-diff.outputs.php_diff || github.ref == 'refs/heads/developer-edition' }}
strategy:
fail-fast: false
matrix:
wordpress_versions: ['latest', '5.5', '5.4', '5.3']
php_versions: ['5.6', '7.0', '7.1', '7.2', '7.3', '7.4']
name: WordPress ${{ matrix.wordpress_versions }} - PHP version ${{ matrix.php_versions }}
env:
WP_TESTS_DIR: /tmp/wordpress-tests-lib
steps:
- name: Startup MySQL service
run: sudo /etc/init.d/mysql start
- name: Checkout source code
uses: actions/checkout@master
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php_versions }}
- name: Install Dependencies
run: |
bash bin/install-wp-tests.sh wordpress_test root root localhost ${{ matrix.wordpress_versions }}
composer update --no-interaction
- name: Run Test
run: composer run test
- name: Run Test - Multisite
run: WP_MULTISITE=1 composer run test