-
Notifications
You must be signed in to change notification settings - Fork 14
/
disabled.travis.yml
124 lines (113 loc) · 3.81 KB
/
disabled.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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
language: php
dist: bionic
notifications:
email:
recipients:
on_success: never
on_failure: never
sudo: false
services:
- mysql
addons:
apt:
packages:
- parallel
- libxml2-utils
- nodejs
- npm
cache:
directories:
- $HOME/.composer/cache
before_install:
- composer self-update
- composer --version
before_script:
# Installs TYPO3
- composer require nimut/typo3-complete=$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
- ln -nfs .Build/vendor/typo3/cms/typo3 typo3
script:
- >
echo;
echo "Running xmllint (Xliff)";
find Resources/Private/Language/ -name '*.xlf' -type f | xargs xmllint --noout --schema Misc/Validation/Xliff.xsd
- >
echo;
echo "Running php lint";
find . -name \*.php ! -path "./.Build/*" ! -path "./scripts/*" ! -path "./typo3_src/*" | parallel --gnu php -d display_errors=stderr -l {} > /dev/null \;
- >
if [[ "$COVERAGE" == "0" ]]; then
echo;
echo "Running unit tests";
.Build/bin/phpunit --colors -c $UNIT_XML Tests/Unit/
fi
- >
if [[ "$COVERAGE" == "1" ]]; then
echo;
echo "Running unit tests";
.Build/bin/phpunit --coverage-clover=unittest-coverage.clover --colors -c $UNIT_XML Tests/Unit/
fi
- >
if [[ "$FUNCTIONAL" == "1" ]]; then
echo;
echo "Running functional tests";
export typo3DatabaseName="typo3";
export typo3DatabaseHost="localhost";
export typo3DatabaseUsername="root";
export typo3DatabasePassword="";
find 'Tests/Functional' -wholename '*Test.php' | parallel --gnu 'echo; echo "Running functional test suite {}"; .Build/bin/phpunit --coverage-clover={}functionaltest-coverage.clover --colors -c $FUNCTIONAL_XML {}'
fi
- >
if [[ "$COVERAGE" == "1" ]]; then
echo;
echo "Uploading code coverage results";
wget https://scrutinizer-ci.com/ocular.phar
php ocular.phar code-coverage:upload --format=php-clover unittest-coverage.clover
find 'Tests/Functional' -wholename '*Test.php' -exec php ocular.phar code-coverage:upload --format=php-clover {}functionaltest-coverage.clover \;
fi
jobs:
allow_failures:
- env: TYPO3_VERSION=dev-master COVERAGE=0 FUNCTIONAL=1
- env: TYPO3_VERSION=dev-master COVERAGE=0 FUNCTIONAL=0
include:
- stage: test
php: 7.2
env: TYPO3_VERSION=^9.5 COVERAGE=0 FUNCTIONAL=1
- stage: test
php: 7.3
env: TYPO3_VERSION=^9.5 COVERAGE=0 FUNCTIONAL=1
- stage: test
php: 7.2
env: TYPO3_VERSION=^10.4 COVERAGE=0 FUNCTIONAL=1
- stage: test
php: 7.3
env: TYPO3_VERSION=^10.4 COVERAGE=0 FUNCTIONAL=1
- stage: test
php: 7.4
env: TYPO3_VERSION=dev-master COVERAGE=0 FUNCTIONAL=1
- stage: ship to ter
if: tag IS present
php: 7.2
install: skip
before_script: skip
script:
- |
if [ -n "$TYPO3_ORG_USERNAME" ] && [ -n "$TYPO3_ORG_PASSWORD" ]; then
echo -e "Preparing upload of release ${TRAVIS_TAG} to TER\n";
# Install ter client
composer global require helhum/ter-client
# Build extension files
composer extension-release
# Upload
TAG_MESSAGE=`git log -1 --pretty=%B`
echo "Tag-Message: ${TAG_MESSAGE}"
echo "Uploading release ${TRAVIS_TAG} to TER"
$HOME/.config/composer/vendor/bin/ter-client upload typo3_console . -u "$TYPO3_ORG_USERNAME" -p "$TYPO3_ORG_PASSWORD" -m "$TAG_MESSAGE"
fi;