forked from TechnicPack/TechnicSolder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
36 lines (36 loc) · 1.11 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
dist: trusty
branches:
except:
- /^legacy\/.*$/
- heroku
language: php
cache:
directories:
- $HOME/.composer/cache
php:
- 5.6
- 7.0
env:
global:
- APP_ENV='testing'
matrix:
- DB="pgsql" REPO="$TRAVIS_BUILD_DIR/public/resources/default/" REPO_TYPE="local"
- DB="mysql" REPO="$TRAVIS_BUILD_DIR/public/resources/default/" REPO_TYPE="local"
matrix:
fast_finish: true
sudo: false
before_install:
- echo $REPO
- rm -f ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini
- composer self-update
install: COMPOSER_MEMORY_LIMIT=-1 travis_retry composer install --prefer-source --no-interaction
before_script:
- php artisan env
- sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'DROP DATABASE IF EXISTS solder;' -U postgres; fi"
- sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'create database solder;' -U postgres; fi"
- sh -c "if [ '$DB' = 'mysql' ]; then mysql -e 'create database IF NOT EXISTS solder;'; fi"
- cp -R app/config-sample app/config
- php artisan migrate:install
- php artisan migrate
- php artisan db:seed --class="TestSeeder"
script: vendor/bin/phpunit --verbose