-
Notifications
You must be signed in to change notification settings - Fork 4
/
.travis.yml
99 lines (84 loc) · 2.58 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
language: php
php:
- 7.0
- 7.1
- 7.2
- 7.3
env:
- TYPO3_VERSION=^8.7 COVERAGE=0 FUNCTIONAL=0
- TYPO3_VERSION=dev-master COVERAGE=0 FUNCTIONAL=0
matrix:
exclude:
- env: TYPO3_VERSION=dev-master COVERAGE=0
php: 7.0
- env: TYPO3_VERSION=dev-master COVERAGE=0
php: 7.1
include:
- env: TYPO3_VERSION=^8.7 COVERAGE=0 FUNCTIONAL=1
php: 7.0
allow_failures:
- env: TYPO3_VERSION=dev-master COVERAGE=0 FUNCTIONAL=1
- env: TYPO3_VERSION=dev-master COVERAGE=0 FUNCTIONAL=0
- php: 7.3
services:
- mysql
notifications:
email:
# recipients:
on_success: never
on_failure: never
sudo: false
addons:
apt:
packages:
- parallel
cache:
directories:
- $HOME/.composer/cache
before_install:
- composer self-update
- composer --version
before_script:
# Installs TYPO3
- composer require --dev typo3/cms=$TYPO3_VERSION;
# Restore composer.json
- git checkout composer.json;
- export "TYPO3_PATH_WEB"=$PWD/.Build/Web;
# Locating UnitTests.xml
- export "UNIT_XML"='.Build/vendor/nimut/testing-framework/res/Configuration/UnitTests.xml'
# Location FunctionalTests.xml
- export "FUNCTIONAL_XML"='.Build/vendor/nimut/testing-framework/res/Configuration/FunctionalTests.xml'
script:
# Execute unit tests
- >
echo "Running unit tests";
if [[ "$COVERAGE" == "1" ]]; then
.Build/bin/phpunit --whitelist Classes/ --coverage-clover=ut-coverage.clover --colors -c $UNIT_XML Tests/Unit
else
.Build/bin/phpunit --colors -c $UNIT_XML Tests/Unit
fi
# Execute functional tests, if enabled
- >
if [[ "$FUNCTIONAL" == "1" ]]; then
echo "Running functional tests"
export typo3DatabaseHost="localhost";
export typo3DatabaseName="typo3";
export typo3DatabaseUsername="root";
export typo3DatabasePassword="";
if [[ "$COVERAGE" == "1" ]]; then
.Build/bin/phpunit --whitelist Classes/ --coverage-clover=ft-coverage.clover --colors -c $FUNCTIONAL_XML Tests/Functional
else
.Build/bin/phpunit --colors -c $FUNCTIONAL_XML Tests/Functional
fi
fi
# Upload code coverage data, if enabled
- >
if [[ "$COVERAGE" == "1" ]]; then
echo "Uploading code coverage results";
wget https://scrutinizer-ci.com/ocular.phar
find . -wholename '*-coverage.clover' -o -name '*-coverage.clover' | xargs -i php ocular.phar code-coverage:upload --format=php-clover {}
fi
- >
echo "Running php lint";
find . -name \*.php ! -path "./.Build/*" | parallel --gnu php -d display_errors=stderr -l {} > /dev/null \;