forked from nette/forms
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
45 lines (37 loc) · 1.41 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
language: php
php:
- 7.1
env:
matrix:
include:
- php: 7.1
env: dependencies="--prefer-lowest --prefer-stable"
- php: 7.1
env: coverage=on
allow_failures:
- php: 7.1
env: coverage=on
script:
- vendor/bin/tester tests -s -c tests/php-unix.ini $coverageArgs
- php temp/code-checker/src/code-checker.php --short-arrays --strict-types -i netteForms
- if [ "$dependencies" ]; then grunt --gruntfile=tests/netteForms/Gruntfile.js test; fi
after_failure:
# Print *.actual content
- for i in $(find tests -name \*.actual); do echo "--- $i"; cat $i; echo; echo; done
before_script:
# Install Nette Tester & Code Checker
- travis_retry composer update --no-interaction --prefer-dist $dependencies
- travis_retry composer create-project nette/code-checker temp/code-checker ~2.8 --no-interaction
- if [ "$dependencies" ]; then npm install -g grunt-cli; cd tests/netteForms; npm install; cd ../..; fi
- if [ "$coverage" == "on" ]; then coverageArgs="-p phpdbg --coverage ./coverage.xml --coverage-src ./src"; fi
after_script:
# Report Code Coverage
- >
if [ "$coverage" == "on" ]; then
wget https://github.com/satooshi/php-coveralls/releases/download/v1.0.1/coveralls.phar
&& php coveralls.phar --verbose --config tests/.coveralls.yml
|| true; fi
sudo: false
cache:
directories:
- $HOME/.composer/cache