2017-05-01 06:44:51 +02:00
|
|
|
# See https://github.com/silverstripe/silverstripe-travis-support for setup details
|
2013-03-29 10:07:05 +01:00
|
|
|
|
2016-03-18 12:51:28 +01:00
|
|
|
language: php
|
2013-03-11 01:44:38 +01:00
|
|
|
|
2019-11-13 00:40:21 +01:00
|
|
|
dist: trusty
|
2015-07-20 17:08:28 +02:00
|
|
|
|
2019-11-13 00:40:21 +01:00
|
|
|
before_install:
|
|
|
|
- sudo apt-get update
|
2013-03-11 01:44:38 +01:00
|
|
|
|
|
|
|
matrix:
|
2013-03-29 10:07:05 +01:00
|
|
|
include:
|
2019-11-13 00:40:21 +01:00
|
|
|
- php: 5.6
|
2017-06-12 08:37:11 +02:00
|
|
|
env: DB=MYSQL CORE_RELEASE=3.6
|
2017-05-01 06:44:51 +02:00
|
|
|
- php: 7.1
|
2019-11-13 00:40:21 +01:00
|
|
|
env: DB=MYSQL CORE_RELEASE=3.7
|
|
|
|
- php: 7.2
|
|
|
|
env: DB=MYSQL CORE_RELEASE=3.7 NPM_TEST=1
|
|
|
|
- php: 7.3
|
2019-12-15 21:11:00 +01:00
|
|
|
env: DB=MYSQL CORE_RELEASE=3.7 COVERAGE="--coverage-clover=coverage.xml"
|
2013-03-11 01:44:38 +01:00
|
|
|
|
|
|
|
before_script:
|
2017-06-12 08:37:11 +02:00
|
|
|
- echo -e "[server]\nmax_allowed_packet=64M" | sudo tee -a /etc/mysql/conf.d/dms.cnf
|
|
|
|
- sudo service mysql restart
|
2016-07-15 17:05:34 +02:00
|
|
|
- composer self-update || true
|
2017-05-01 06:44:51 +02:00
|
|
|
- git clone git://github.com/silverstripe/silverstripe-travis-support.git ~/travis-support
|
2017-06-07 11:40:51 +02:00
|
|
|
- php ~/travis-support/travis_setup.php --source `pwd` --target ~/build/ss --require undefinedoffset/sortablegridfield:~0.6.9
|
2017-05-01 06:44:51 +02:00
|
|
|
- cd ~/build/ss
|
2016-07-15 17:05:34 +02:00
|
|
|
- composer install
|
2019-11-13 00:40:21 +01:00
|
|
|
- if [[ $NPM_TEST ]]; then npm install -g yarn && yarn install --network-concurrency 1; fi
|
2013-03-11 01:44:38 +01:00
|
|
|
|
2016-03-18 12:51:28 +01:00
|
|
|
script:
|
2017-05-01 06:44:51 +02:00
|
|
|
- vendor/bin/phpunit "$COVERAGE" dms/tests
|
2019-12-15 21:11:00 +01:00
|
|
|
- if [[ $NPM_TEST ]]; then cd dms; fi
|
|
|
|
- if [[ $NPM_TEST ]]; then yarn install --production=false; fi
|
2019-11-13 00:40:21 +01:00
|
|
|
- if [[ $NPM_TEST ]]; then yarn run build; fi
|
|
|
|
- if [[ $NPM_TEST ]]; then git diff-files --quiet -w --relative=client; fi
|
|
|
|
- if [[ $NPM_TEST ]]; then git diff --name-status --relative=client; fi
|
2019-12-15 21:11:00 +01:00
|
|
|
- if [[ $NPM_TEST ]]; then cd ..; fi
|
2017-05-01 06:44:51 +02:00
|
|
|
|
|
|
|
after_success:
|
|
|
|
- >
|
|
|
|
test "$COVERAGE" != ""
|
|
|
|
&& mv coverage.xml ~/build/$TRAVIS_REPO_SLUG
|
|
|
|
&& cd ~/build/$TRAVIS_REPO_SLUG
|
|
|
|
&& bash <(curl -s https://codecov.io/bash)
|