-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path.travis.yml
46 lines (37 loc) · 1007 Bytes
/
.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
language: php
sudo: required
dist: trusty
php:
- 7.1
env:
global:
- DEFAULT=1
addons:
postgresql: "9.6"
services:
- postgresql
matrix:
fast_finish: true
allow_failures:
- php: 7.1
env: COVERAGE=1 DEFAULT=0
include:
- php: 7.1
env: PHPCS=1 DEFAULT=0
- php: 7.1
env: COVERAGE=1 DEFAULT=0
install:
- composer self-update
- composer install --prefer-dist --no-interaction
before_script:
- psql --version
- psql -c 'create database ocean_project;' -U postgres
- psql -d ocean_project -c 'create extension if not exists citext;' -U postgres
- phpenv rehash
- php artisan migrate --seed
- mkdir -p /opt/xatbot-Bot/src/
- echo "<?php echo 'hello';" > /opt/xatbot-Bot/src/travis.php
script:
- sh -c "if [ '$DEFAULT' = '1' ]; then vendor/bin/phpunit; fi"
- sh -c "if [ '$PHPCS' = '1' ]; then vendor/bin/phpcs -p --extensions=php --standard=PSR2 ./app; fi"
- sh -c "if [ '$COVERAGE' = '1' ]; then vendor/bin/phpunit --coverage-text; fi"