-
Notifications
You must be signed in to change notification settings - Fork 7
76 lines (69 loc) · 2 KB
/
tests-php-alt.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: Automated-Testing
on:
schedule:
- cron: '0 4 * * 5'
push:
branches:
- master
pull_request:
branches:
- master
paths:
- '**.php'
- '!docs/**'
jobs:
Automated-Testing:
runs-on: ubuntu-latest
strategy:
matrix:
php: ['8.1', '8.0', '7.4']
wordpress: ['6.2', '6.1', '6.0']
composer_version: ['v2']
include:
- php: '7.4'
wordpress: '6.1'
coverage: '--coverage --coverage-xml'
xdebug: '2.9.6'
- php: '8.1'
wordpress: '6.0'
debug: '--debug'
- php: '7.4'
xdebug: '3.1.6'
- php: '8.0'
xdebug: '3.1.6'
- php: '8.1'
xdebug: '3.2.1'
fail-fast: false
name: Testing QL Events in WordPress v${{ matrix.wordpress }} running on PHP ${{ matrix.php }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: json, mbstring
tools: composer:v2
env:
GITHUB_TOKEN: ${{ secrets.COMPOSER_TOKEN }}
- name: Install dependencies
env:
WP_VERSION: ${{ matrix.wordpress }}
run: |
cp .env.testing .env
rm -rf composer.lock
composer install
SKIP_DB_CREATE=true SKIP_WP_SETUP=true composer install-test-env
- name: Run Tests w/ Docker.
env:
XDEBUG_VERSION: ${{ matrix.xdebug }}
WP_VERSION: ${{ matrix.wordpress }}
PHP_VERSION: ${{ matrix.php }}
run: composer run-codeception -- ${{ matrix.coverage }} ${{ matrix.debug }}
- name: Push Codecoverage to Coveralls.io
if: ${{ matrix.coverage == '--coverage --coverage-xml' }}
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
composer global require php-coveralls/php-coveralls
php-coveralls -v