forked from georgringer/eventnews
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
79 lines (70 loc) · 2.16 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
language: php
matrix:
fast_finish: true
include:
- php: 7.2
env: TYPO3_VERSION=^9 TESTING_FRAMEWORK=^4 FUNCTIONALS=1 COVERAGE=1
- php: 7.3
env: TYPO3_VERSION=^9 TESTING_FRAMEWORK=^4 FUNCTIONALS=1 COVERAGE=0
# - php: 7.2
# env: TYPO3_VERSION=^10 TESTING_FRAMEWORK=^5 FUNCTIONALS=1 COVERAGE=0
# - php: 7.3
# env: TYPO3_VERSION=^10 TESTING_FRAMEWORK=^5 FUNCTIONALS=1 COVERAGE=0
- php: 7.4
env: TYPO3_VERSION=^9 TESTING_FRAMEWORK=^4 FUNCTIONALS=1 COVERAGE=0
# - php: 7.4
# env: TYPO3_VERSION=^10 TESTING_FRAMEWORK=^5 FUNCTIONALS=1 COVERAGE=0
services:
- mysql
sudo: false
addons:
apt:
packages:
- parallel
cache:
directories:
- $HOME/.composer/cache
before_install:
- composer self-update
- composer --version
before_script:
- composer require "typo3/minimal:${TYPO3_VERSION}"
- composer require "typo3/testing-framework:${TESTING_FRAMEWORK}"
- if [[ "$COVERAGE" == "1" ]]; then composer require "phpunit/phpcov ^5"; fi
- mkdir cov
# Restore composer.json
- git checkout composer.json
# - export TYPO3_PATH_WEB=$PWD/.Build/Web
script:
- >
if [[ "$COVERAGE" == "0" ]]; then
echo;
echo "Running unit tests";
.Build/bin/phpunit --colors -c Build/UnitTests.xml Tests/Unit/
fi
- >
if [[ "$COVERAGE" == "1" ]]; then
echo;
echo "Running unit tests";
.Build/bin/phpunit --coverage-php cov/coverage-unit.cov --colors -c Build/UnitTests.xml Tests/Unit/
fi
- >
echo;
echo "Running php lint";
find . -name \*.php ! -path "./.Build/*" | parallel --gnu php -d display_errors=stderr -l {} > /dev/null \;
# - >
# if [[ "$COVERAGE" == "1" ]]; then
# echo;
# export typo3DatabaseName="typo3";
# export typo3DatabaseHost="127.0.0.1";
# export typo3DatabaseUsername="root";
# export typo3DatabasePassword="";
# .Build/bin/phpunit --coverage-php cov/coverage-functional.cov --colors -c Build/FunctionalTests.xml Tests/Functional/
# fi
after_script:
- >
if [[ "$COVERAGE" == "1" ]]; then
echo;
.Build/bin/phpcov merge cov --clover build/logs/clover.xml
travis_retry php .Build/bin/php-coveralls -v
fi