forked from flyimg/flyimg
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
35 lines (27 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
env:
global:
- CC_TEST_REPORTER_ID=c7264c1346c36d566e283acdb77d379d38ed2a61ef31f0dcf00b592e3de0c90f
language: php
services:
- docker
before_script:
- docker build -t flyimg .
- docker run -itd -v $(pwd):/var/www/html --name flyimg flyimg
- docker exec flyimg composer install
- docker exec flyimg vendor/bin/phpcs --config-set installed_paths vendor/escapestudios/symfony2-coding-standard
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
- chmod +x ./cc-test-reporter
- ./cc-test-reporter before-build
script:
- docker exec flyimg vendor/bin/phpcs --standard=PSR2 src/ tests/
- docker exec flyimg vendor/bin/phpunit --coverage-clover build/logs/clover.xml
after_script:
- if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then docker exec flyimg sed -i 's:/var/www/html/::g' build/logs/clover.xml; fi
- if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then ./cc-test-reporter after-build -t clover -p build/logs --exit-code $TRAVIS_TEST_RESULT; fi
branches:
only:
- master
notifications:
email: