-
Notifications
You must be signed in to change notification settings - Fork 7
55 lines (43 loc) · 1.21 KB
/
tests.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
name: Tests
on:
pull_request:
jobs:
test:
name: Tests
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Configure PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.1
tools: composer:v2
- name: Install dependencies
run: composer install --prefer-dist --no-progress
- name: Running unit test
run: composer phpunit
wp-test:
name: WordPress tests
runs-on: ubuntu-latest
services:
mysql:
image: mysql:8.0
env:
MYSQL_ALLOW_EMPTY_PASSWORD: false
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=10s --health-retries=10
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Install PHP 8.1
uses: shivammathur/setup-php@v2
with:
php-version: 8.1
tools: composer:v2
- name: "Install composer dependencies"
run: composer install --prefer-dist --no-progress
- name: Install WP
shell: bash
run: config/scripts/install-wp-tests.sh wordpress_test root '' 127.0.0.1:3306