-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
38 lines (30 loc) · 1.06 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
language: php
services:
- docker
env:
- DOCKER_COMPOSE_VERSION=1.25.0
cache:
directories:
- docker_images
before_install:
- echo "$DOCKER_KEY" | docker login -u "$DOCKER_USERNAME" --password-stdin
- docker load -i docker_images/images.tar || true
- mkdir shared
- sudo rm /usr/local/bin/docker-compose
- curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose
- chmod +x docker-compose
- sudo mv docker-compose /usr/local/bin
install:
- docker-compose up -d
- docker-compose exec php composer --no-interaction install
- docker-compose exec php php artisan migrate --seed
- docker-compose exec php php artisan migrate --seed --env=test
script:
- docker-compose ps
- docker-compose exec php php artisan test --coverage-clover=coverage.xml
after_script:
- docker cp php-fpm:/var/www/laravel/coverage.xml shared
- bash <(curl -s https://codecov.io/bash)
- docker-compose stop
before_cache:
- docker save -o docker_images/images.tar $(docker images -a -q)