forked from PoweredLocal/vrata
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
30 lines (24 loc) · 1.17 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
language: php
services:
- docker
cache:
directories:
- $HOME/.composer/cache
php:
- '7.1'
install:
- composer install --dev
- mkdir -p build/logs
- docker build -t pwred/vrata .
- docker ps
- docker run -d --name app -e APP_KEY=EzMx2svtA1CsOzPrqE9EMmUkegls4mjv -e GATEWAY_SERVICES="[]" -e GATEWAY_ROUTES="[]" pwred/vrata; sleep 10
script:
- docker exec app /bin/sh -c "cd /home/app; cat /dev/null >> database/gateway.sqlite; export APP_ENV=testing; export DB_DATABASE=database/gateway.sqlite; php artisan migrate --database=sqlite"
- docker exec app /bin/sh -c "cd /home/app; touch storage/logs/lumen.log; export APP_ENV=testing; export APP_DEBUG=true; rm -f storage/oauth*.key; php artisan passport:keys; ./vendor/bin/phpunit"
- docker exec app /bin/sh -c "cd /home/app; rm -f storage/oauth*.key; phpdismod xdebug; ls -l storage/logs/lumen.log; cat storage/logs/lumen.log"
- docker cp app:/home/app/build/logs/clover.xml ./build/logs/clover.xml
- if [ -n "$CODECLIMATE_REPO_TOKEN" ]; then ./vendor/bin/test-reporter; fi
after_success:
- docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD"
- docker commit app pwred/vrata
- docker push pwred/vrata