-
Notifications
You must be signed in to change notification settings - Fork 3
/
.travis.yml
69 lines (60 loc) · 1.77 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
language: php
php:
- 7.0
- 7.1
- 7.2
env:
- TYPO3_VERSION="^7.6"
- TYPO3_VERSION="^8.7"
- TYPO3_VERSION="^9.1"
matrix:
exclude:
- php: 7.0
env: TYPO3_VERSION="^9.1"
- php: 7.1
env: TYPO3_VERSION="^9.1"
sudo: false
addons:
apt:
packages:
- parallel
cache:
directories:
- $HOME/.composer/cache
before_install:
- phpenv config-rm xdebug.ini
before_script:
- composer require typo3/minimal="$TYPO3_VERSION"
# Restore composer.json
- git checkout composer.json
- export TYPO3_PATH_WEB=$PWD/.Build/Web
script:
- >
echo;
echo "Running php lint";
echo;
echo;
find . -name \*.php ! -path "./.Build/*" ! -path "./vendor/*" | parallel --gnu php -d display_errors=stderr -l {} > /dev/null \;;
- >
echo;
echo "Running php cs checks";
echo;
echo;
IFS=$'\n'; COMMIT_SCA_FILES=($(git diff --name-only --diff-filter=ACMRTUXB "${TRAVIS_COMMIT_RANGE}")); unset IFS;
.Build/bin/php-cs-fixer fix --config=.php_cs.dist -v --dry-run --stop-on-violation --using-cache=no --path-mode=intersection -- "${COMMIT_SCA_FILES[@]}";
- >
echo;
echo "Running unit tests";
echo;
echo;
.Build/bin/phpunit -c vendor/nimut/testing-framework/res/Configuration/UnitTests.xml .Build/Web/typo3conf/ext/twig_for_typo3/Tests/Unit/;
- >
echo;
echo "Running functional tests";
echo;
echo;
export typo3DatabaseName="typo3";
export typo3DatabaseHost="localhost";
export typo3DatabaseUsername="root";
export typo3DatabasePassword="";
find '.Build/Web/typo3conf/ext/twig_for_typo3/Tests/Functional' -wholename '*Test.php' | parallel --gnu 'echo; echo "Running functional test suite {}"; .Build/bin/phpunit -c vendor/nimut/testing-framework/res/Configuration/FunctionalTests.xml {}';