mirror of
https://github.com/silverstripe/silverstripe-dms
synced 2024-10-22 14:05:56 +02:00
46 lines
1.5 KiB
YAML
46 lines
1.5 KiB
YAML
# See https://github.com/silverstripe/silverstripe-travis-support for setup details
|
|
|
|
language: php
|
|
|
|
dist: trusty
|
|
|
|
before_install:
|
|
- sudo apt-get update
|
|
|
|
matrix:
|
|
include:
|
|
- php: 5.6
|
|
env: DB=MYSQL CORE_RELEASE=3.6
|
|
- php: 7.1
|
|
env: DB=MYSQL CORE_RELEASE=3.7
|
|
- php: 7.2
|
|
env: DB=MYSQL CORE_RELEASE=3.7 NPM_TEST=1
|
|
- php: 7.3
|
|
env: DB=MYSQL CORE_RELEASE=3.7 COVERAGE="--coverage-clover=coverage.xml"
|
|
|
|
before_script:
|
|
- echo -e "[server]\nmax_allowed_packet=64M" | sudo tee -a /etc/mysql/conf.d/dms.cnf
|
|
- sudo service mysql restart
|
|
- composer self-update || true
|
|
- git clone git://github.com/silverstripe/silverstripe-travis-support.git ~/travis-support
|
|
- php ~/travis-support/travis_setup.php --source `pwd` --target ~/build/ss --require undefinedoffset/sortablegridfield:~0.6.9
|
|
- cd ~/build/ss
|
|
- composer install
|
|
- if [[ $NPM_TEST ]]; then npm install -g yarn && yarn install --network-concurrency 1; fi
|
|
|
|
script:
|
|
- vendor/bin/phpunit "$COVERAGE" dms/tests
|
|
- if [[ $NPM_TEST ]]; then cd dms; fi
|
|
- if [[ $NPM_TEST ]]; then yarn install --production=false; fi
|
|
- 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
|
|
- if [[ $NPM_TEST ]]; then cd ..; fi
|
|
|
|
after_success:
|
|
- >
|
|
test "$COVERAGE" != ""
|
|
&& mv coverage.xml ~/build/$TRAVIS_REPO_SLUG
|
|
&& cd ~/build/$TRAVIS_REPO_SLUG
|
|
&& bash <(curl -s https://codecov.io/bash)
|