-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
48 lines (39 loc) · 929 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
47
48
sudo: required
env:
global:
- COMMIT=${TRAVIS_COMMIT::8}
- PGPORT=5433
services:
- docker
- redis-server
addons:
postgresql: "10"
apt:
packages:
- postgresql-10
- postgresql-client-10
language: php
php:
- "7.2"
before_script:
- composer install --optimize-autoloader
- cp .env.example .env
- php artisan key:generate
- php artisan jwt:secret
- psql -c "CREATE USER commander PASSWORD 'secret';"
- psql -c "CREATE DATABASE eve_commander WITH OWNER = commander;"
- psql -c "CREATE DATABASE eve_sde WITH OWNER = commander;"
- php artisan migrate --seed
script:
- phpunit
after_success:
- rm .env
- export REPO=$DOCKER_USERNAME/evecommander-php;
- docker build -t $REPO:$COMMIT .;
- docker tag $REPO:$COMMIT $REPO:latest;
- docker tag $REPO:$COMMIT $REPO:travis-$TRAVIS_BUILD_NUMBER;
deploy:
provider: script
script: bash docker_push
on:
branch: master