forked from chrizzor/sf_event_mgt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
86 lines (77 loc) · 2.49 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
language: php
sudo: false
services:
- mysql
addons:
apt:
packages:
- parallel
cache:
directories:
- $HOME/.composer/cache
notifications:
email:
before_install:
- if php -i | grep -q xdebug; then phpenv config-rm xdebug.ini; fi
before_script:
- composer require typo3/minimal="$TYPO3_VERSION"
- export TYPO3_PATH_WEB=$PWD/.Build/Web
script:
- >
if [[ "$COVERAGE" == "0" ]]; then
echo;
echo "Running unit tests";
.Build/bin/phpunit -c Tests/Build/UnitTests.xml
fi
- >
if [[ "$COVERAGE" == "1" ]]; then
echo;
echo "Running unit tests";
.Build/bin/phpunit --coverage-clover=unittest-coverage.clover -c Tests/Build/UnitTests.xml
fi
- >
echo;
echo "Running php lint";
find . -name \*.php ! -path "./.Build/*" | parallel --gnu php -d display_errors=stderr -l {} > /dev/null \;
- >
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 -c Tests/Build/FunctionalTests.xml {}'
fi
- >
if [[ "$COVERAGE" == "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 -c Tests/Build/FunctionalTests.xml {}'
fi
- >
if [[ "$COVERAGE" == "1" ]]; then
echo;
echo "Uploading code coverage results";
wget https://scrutinizer-ci.com/ocular.phar
cp -R typo3conf/ext/sf_event_mgt/.git .
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:
fast_finish: true
include:
- stage: test
php: 7.2
env: TYPO3_VERSION=^10.4 COVERAGE=0
- stage: test
php: 7.3
env: TYPO3_VERSION=^10.4 COVERAGE=1
- stage: test
php: 7.4
env: TYPO3_VERSION=^10.4 COVERAGE=0