-
Notifications
You must be signed in to change notification settings - Fork 5
53 lines (52 loc) · 1.51 KB
/
test.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
name: Test
on:
schedule:
- cron: '0 0 * * *'
push:
branches:
- '**'
env:
TERM: xterm-256color
jobs:
php8-compatibility:
name: PHP 8.x Compatibility
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: PHP Compatibility
uses: pantheon-systems/phpcompatibility-action@dev
with:
test-versions: 8.0-
paths: ${{ github.workspace }}/*.php ${{ github.workspace }}/inc/*.php ${{ github.workspace }}/inc/network/*.php
test:
needs: php8-compatibility
name: Test
runs-on: ubuntu-latest
services:
mariadb:
image: mariadb:10.6
steps:
- uses: actions/checkout@v4
- name: Setup PHP 8.3
uses: shivammathur/setup-php@v2
with:
php-version: 8.3
extensions: mysqli, zip, imagick
- name: Start MySQL
run: sudo systemctl start mysql
- name: Cache dependencies
uses: actions/cache@v3
with:
path: ~/vendor
key: test-phpunit-dependencies-${{ hashFiles('composer.json') }}
restore-keys: test-phpunit-dependencies-${{ hashFiles('composer.json') }}
- name: Install Composer dependencies
run: composer install
- name: Install WP-CLI
run: |
curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
chmod +x wp-cli.phar
sudo mv wp-cli.phar /usr/local/bin/wp
- name: Run PHPUnit
run: bash ./bin/phpunit-test.sh