-
Notifications
You must be signed in to change notification settings - Fork 62
75 lines (63 loc) · 2.25 KB
/
php-8.0.0.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
name: Unit Tests / PHP (v8.0.0)
on:
push:
branches: [ master, develop ]
pull_request:
branches: [ master, develop ]
jobs:
build:
runs-on: ubuntu-20.04
strategy:
matrix:
wp-versions: ['6.0.2']
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v2 # Checkout the Stackable Premium repo.
with:
repository: 'bfintal/Stackable-Premium'
ref: 'v3'
path: 'pro__premium_only'
token: '${{ secrets.ACCESS_KEY }}'
# Change the PHP version to v8.0.0
- name: Setup PHP v8.0.0
uses: shivammathur/setup-php@v2
with:
php-version: '8.0.0'
- name: Check PHP version
run: php -v
- name: Install dependencies
run: |
composer require phpunit/phpunit:7.5.20 --dev --ignore-platform-reqs
composer require wp-phpunit/wp-phpunit:${{ matrix.wp-versions }} --dev --ignore-platform-reqs
composer require roots/wordpress:${{ matrix.wp-versions }} --dev --ignore-platform-reqs
composer install --prefer-dist --no-progress --ignore-platform-reqs
- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: 14.x
- name: Build Stackable Free Plugin
run: |
npm ci
npm run build --if-present
- name: Setup MySQL
uses: mirromutth/[email protected]
with:
mysql database: 'stackable' # Optional, default value is "test". The specified database which will be create
mysql root password: 'root' # Required if "mysql user" is empty, default is empty. The root superuser password
mysql version: '5.6'
mysql user: 'root' # Required if "mysql root password" is empty, default is empty. The superuser for the specified database. Can use secrets, too
mysql password: 'root' # Required if "mysql user" exists. The password for the "mysql user"
- name: Wait for MySQL
run: |
while ! mysqladmin ping --host=127.0.0.1 --password=root --silent; do
sleep 1
done
- name: Run test suite
env:
MYSQL_GITHUB_ACTION: true
MYSQL_DATABASE: stackable
MYSQL_USER: root
MYSQL_PASSWORD: root
MYSQL_ROOT_PASSWORD: root
MYSQL_PORT: 3306
run: composer run-script test