-
-
Notifications
You must be signed in to change notification settings - Fork 1k
83 lines (71 loc) · 2.29 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
name: Tests
on:
push:
branches:
- master
- develop
- 3.x
pull_request:
jobs:
PHPUnitTests:
# runs-on: ${{ matrix.os }}
runs-on: ubuntu-latest
strategy:
max-parallel: 6
matrix:
# os: [ubuntu-latest, windows-latest]
php: ['7.4', '8.0', '8.1']
db: ['mysql:5.7', 'mysql:8.0', 'mariadb:10.2', 'mariadb:10.6']
include:
- db: 'mysql:5.7'
dbName: 'MySQL 5.7'
- db: 'mysql:8.0'
dbName: 'MySQL'
- db: 'mariadb:10.2'
dbName: 'MariaDB 10.2'
- db: 'mariadb:10.6'
dbName: 'MariaDB'
fail-fast: false
services:
mysql:
image: ${{ matrix.db }}
ports:
- 3306
name: 'PHPUnit Tests ${{ matrix.php }} / ${{ matrix.dbName }}'
steps:
- name: Checkout changes
uses: actions/checkout@v1
- name: Create MySQL Database
run: |
sudo systemctl start mysql
mysql -u${{ env.DB_USERNAME }} -p${{ env.DB_PASSWORD }} -e 'CREATE DATABASE ${{ env.DB_DATABASE }};' --port ${{ env.DB_PORT }}
- name: Install PHP
uses: shivammathur/setup-php@master
with:
php-version: ${{ matrix.php }}
extensions: mbstring, intl, gd, xml, sqlite
- name: Install composer dependencies
run: composer install --no-interaction --prefer-dist --no-progress --no-scripts
- name: Reset TastyIgniter library
run: |
git reset --hard HEAD
rm -rf ./vendor/tastyigniter/flame
wget https://github.com/tastyigniter/flame/archive/master.zip -O ./vendor/tastyigniter/master.zip
unzip ./vendor/tastyigniter/master.zip -d ./vendor/tastyigniter
mv ./vendor/tastyigniter/flame-master ./vendor/tastyigniter/flame
composer dump-autoload
- name: Run composer post-update scripts
run: |
php artisan key:generate --force
php artisan igniter:install --no-interaction
php artisan igniter:util set version
php artisan package:discover
- name: Run PHPUnit Test Suite
run: ./vendor/bin/phpunit
env:
DB_PORT: 3306
DB_DATABASE: test
DB_USERNAME: root
DB_PASSWORD: root
DB_PREFIX: 'ti_'
IGNITER_LOCATION_MODE: multiple