-
Notifications
You must be signed in to change notification settings - Fork 7
61 lines (54 loc) · 1.61 KB
/
test-nightly.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
name: Unit Tests on Nightly
on:
# Once weekly on Mondays at 06:00 UTC.
schedule:
- cron: '0 6 * * 1'
workflow_dispatch:
jobs:
build:
strategy:
matrix:
php: ['7.4']
include:
- php: '8.0'
experimental: true
fail-fast: false
name: WP nightly / PHP ${{ matrix.php }}
runs-on: ubuntu-20.04
steps:
- name: Checkout repository
uses: actions/checkout@v1
- name: Install PHP
uses: shivammathur/setup-php@2.7.0
with:
php-version: ${{ matrix.php }}
extensions: mysqli, xmlwriter
coverage: none
tools: composer:v2
- name: Debugging
run: |
php --version
php -m
composer --version
mysql --version
- name: Get Composer Cache Directory
id: composer-cache-dir
run: |
echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Cache PHP Dependencies
id: composer-cache
uses: actions/cache@v2
with:
path: ${{ steps.composer-cache-dir.outputs.dir }}
key: ${{ runner.os }}-composer-${{ matrix.php }}-${{ hashFiles('composer.lock') }}
- name: Install PHP Dependencies
run: |
composer install --prefer-dist --no-progress --no-suggest --no-interaction --ignore-platform-reqs
composer require --dev --update-with-dependencies --prefer-dist roots/wordpress="dev-nightly" wp-phpunit/wp-phpunit="dev-master"
- name: Run the tests
run: |
sudo systemctl start mysql.service
composer test:ut
env:
MYSQL_DATABASE: wordpress
WP_TESTS_DB_PASS: root