forked from slimkit/plus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
48 lines (41 loc) · 1.14 KB
/
.travis.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
sudo: false
language: php
matrix:
fast_finish: true
include:
- php: 7.0
env: DB=mysql
services: mysql
- php: 7.0
env: DB=postgres
services: postgresql
- php: 7.1
env: DB=mysql
services: mysql
- php: 7.1
env: DB=postgres
services: postgresql
- php: 7.2
env: DB=mysql
services: mysql
- php: 7.2
env: DB=postgres
services: postgresql
cache:
directories:
- $HOME/.composer/cache
before_install:
- sh -c "if [ '$DB' = 'postgres' ]; then psql -c 'create database plus;' -U postgres; echo "$DB"; fi"
- sh -c "if [ '$DB' = 'mysql' ]; then mysql -e 'CREATE DATABASE IF NOT EXISTS plus;'; echo "$DB"; fi"
- sh -c "php ./.travis.php "$DB""
- php -r "file_exists('.env') || copy('.env.travis', '.env');"
install:
- composer install
- php artisan key:generate
script:
- php artisan migrate -vvv
- php artisan db:seed -vvv
- php artisan vendor:publish --all -vvv
- php vendor/bin/phpunit --coverage-clover=./storage/logs/coverage.xml
after_script:
- php vendor/bin/codacycoverage clover ./storage/logs/coverage.xml