-
-
Notifications
You must be signed in to change notification settings - Fork 13
72 lines (63 loc) · 2.24 KB
/
Copy pathphpunit-tests-7.yml
File metadata and controls
72 lines (63 loc) · 2.24 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: PHPUnit Tests (7.x)
on:
push:
branches:
- main
- development
pull_request:
branches:
types: [closed]
schedule:
- cron: '0 0 * * 0'
jobs:
test-php:
name: WordPress ${{ matrix.wordpress-versions }} - PHP ${{ matrix.php-versions }} on ${{ matrix.operating-system }}
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
php-versions: [ '7.4' ]
wordpress-versions: [ '6.7', '6.6', '6.5' ]
operating-system: [ ubuntu-22.04 ]
env:
UTMDC_BITLY_API: ${{secrets.UTMDC_BITLY_API}}
UTMDC_REBRANDLY_API: ${{secrets.UTMDC_REBRANDLY_API}}
UTMDC_PLUGIN_DIR: ${{secrets.UTMDC_PLUGIN_DIR}}
steps:
- name: Setup MySQL
# Commit hash for v1.53.1: https://github.com/shogo82148/actions-setup-mysql/releases/tag/v1.53.1
uses: shogo82148/actions-setup-mysql@62da9377d83991fce27b6ed2a397d3306121e41d
with:
mysql-version: '5.7'
auto-start: true
root-password: root
- name: Setup PHP
# Commit hash for v2.37.2: https://github.com/shivammathur/setup-php/releases/tag/2.37.2
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240
with:
php-version: ${{ matrix.php-versions }}
extensions: mbstring
ini-values: post_max_size=256M, max_execution_time=180
coverage: xdebug
- name: Log Debug Information
run: |
echo "$GITHUB_REF"
echo "$GITHUB_EVENT_NAME"
php --version
mysql --version
lsb_release -a
- name: Checkout utm.codes
# Commit hash for v7.0.1: https://github.com/actions/checkout/releases/tag/v7.0.1
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
with:
fetch-depth: 0
- name: Install PHPUnit
run: |
composer require phpunit/phpunit:^8 --update-with-dependencies
composer require yoast/phpunit-polyfills:^1 --update-with-dependencies
- name: Install WordPress
run: |
bash _test/bin/install-wp-tests.sh wordpress_test root root 127.0.0.1:3306 ${{ matrix.wordpress-versions }}
- name: Run PHPUnit Tests
run: |
cd _test
../vendor/bin/phpunit