-
Notifications
You must be signed in to change notification settings - Fork 7
/
.travis.yml
62 lines (48 loc) · 1.46 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# Tell Travis CI we are using PHP
language: php
# The platforms you wants to test on
os:
- linux
# git configs
git:
depth: 1
# codeclimate
env:
global:
- CC_TEST_REPORTER_ID=5308141f77638e360604f49a1c0066d79a4870c26c9fb68523d790b36df5174b
- 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)
# Define the php versions against we want to test our code
php:
- 7.0
- 7.1
matrix:
fast_finish: true
# We don't want to run linux commands as super user
sudo: false
# Get the codeclimate stuff
before_script:
- 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
# Composer package installation
install:
# Install composer packages, will also trigger dump-autoload
- travis_retry composer install --no-interaction
# Testing the app (see phpunit.xml), generating Code Coverage report
script:
- ./vendor/bin/phpunit --coverage-clover build/logs/clover.xml
after_script:
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
# Tell Travis CI to monitor only 'master' branch
branches:
only: master
# Configure email notifications
notifications:
email:
on_success: never
on_failure: always
# You can delete cache using travis-ci web interface
cache:
directories:
- vendor
- $HOME/.cache/composer