-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
32 lines (24 loc) · 901 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
language: php
sudo: false
cache:
directories:
- $HOME/.composer/cache/files
env:
global:
- CC_TEST_REPORTER_ID=8b7cec44d4215193f60b76cca3e21a6baa936389cf46646b4e24b0972421a8bd
- GIT_COMMITTED_AT=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then git log -1 --pretty=format:%ct; else git log -1 --skip 1 --pretty=format:%ct; fi)
php:
- 7.1
- 7.2
before_install:
- composer self-update
install:
- composer install
before_script:
- composer require codeclimate/php-test-reporter --dev
- 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:
- vendor/bin/phpunit --coverage-text --coverage-clover build/logs/clover.xml
- if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT; fi