-
Notifications
You must be signed in to change notification settings - Fork 52
/
.travis.yml
45 lines (38 loc) · 1.5 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
# 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)