forked from opencfp/opencfp
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.travis.yml
44 lines (35 loc) · 1.25 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
language: php
sudo: false
matrix:
fast_finish: true
include:
- php: 7.0
env: WITH_COVERAGE=true
- php: 5.6
env: WITH_CS=true
- php: 5.5
env:
global:
- TRAVIS_DB=cfp_test
- CODECLIMATE_REPO_TOKEN=9deb249b01a414d979959cfd05a4c351b19a5959858653b20276454d4189edc3
# cache composer downloads so installing is quicker
cache:
directories:
- $HOME/.composer/cache
before_install:
- if [[ "$TRAVIS_PULL_REQUEST" == "false" && "$TRAVIS_BRANCH" == "master" ]]; then COLLECT_COVERAGE=true; else COLLECT_COVERAGE=false; fi
- if [[ "$COLLECT_COVERAGE" == "false" ]]; then phpenv config-rm xdebug.ini; fi
- composer self-update
- composer validate --no-check-publish
install:
- composer install
before_script:
- sh tools/travis/setup-mail.sh
- mysql -e "CREATE DATABASE $TRAVIS_DB" -uroot
- cp phinx.yml.dist phinx.yml
- vendor/bin/phinx migrate -e testing
script:
- if [[ "$COLLECT_COVERAGE" == "true" ]]; then vendor/bin/phpunit --coverage-clover build/logs/clover.xml; else vendor/bin/phpunit; fi
- if [[ "$WITH_CS" == "true" ]]; then vendor/bin/php-cs-fixer fix --verbose --diff; fi
after_success:
- if [[ "$COLLECT_COVERAGE" == "true" ]]; then vendor/bin/test-reporter --coverage-report build/logs/clover.xml; fi