forked from evoWeb/extender
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
110 lines (95 loc) · 4.04 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
100
101
102
103
104
105
106
107
108
109
110
language: php
sudo: false
branches:
only:
- master
- develop
- /^[0-9]+\.[0-9]+\.[0-9]+$/
cache:
directories:
- $HOME/.composer/cache
notifications:
email:
install:
- >
export TYPO3_PATH_WEB=$PWD/.Build/Web;
composer require typo3/minimal="$TYPO3_VERSION" $PREFER_LOWEST;
if [ ! -z "$PHPUNIT_VERSION" ]; then composer require --dev phpunit/phpunit="$PHPUNIT_VERSION"; fi;
if [ ! -z "$TESTING_FRAMEWORK" ]; then composer require --dev typo3/testing-framework="$TESTING_FRAMEWORK"; fi;
git checkout composer.json;
before_script:
- phpenv config-rm xdebug.ini
script:
- >
echo "Running $TYPO3_VERSION unit tests in folder '$UNITTEST_FOLDER' with suite '$UNITTEST_SUITE'";
.Build/bin/phpunit --colors -c $UNITTEST_SUITE $UNITTEST_FOLDER
jobs:
fast_finish: true
allow_failures:
- env:
- TYPO3_VERSION="dev-master as 10.0.0" TESTING_FRAMEWORK="~4.10.0" PHPUNIT_VERSION="" UNITTEST_FOLDER="Tests/Unit/" UNITTEST_SUITE=".Build/Web/vendor/typo3/testing-framework/Resources/Core/Build/UnitTests.xml"
include:
- &lint
stage: test
php: 7.2
env: TASK="PHP Lint"
before_install: skip
install: skip
before_script: skip
script:
- echo "Running php lint";
errors=$(find . -name \*.php ! -path "./.Build/*" -exec php -d display_errors=stderr -l {} 2>&1 >/dev/null \;) && echo "$errors" && test -z "$errors"
- <<: *lint
php: 7.1
- <<: *lint
php: 7.0
- stage: test
php: 5.5
env:
- TYPO3_VERSION="^7.6" TESTING_FRAMEWORK="" PHPUNIT_VERSION="~4.8.0" UNITTEST_FOLDER="Tests/Unit7/" UNITTEST_SUITE=".Build/Web/typo3/sysext/core/Build/UnitTests.xml"
- stage: test
php: 7.2
env:
- TYPO3_VERSION="^7.6" TESTING_FRAMEWORK="" PHPUNIT_VERSION="~4.8.0" UNITTEST_FOLDER="Tests/Unit7/" UNITTEST_SUITE=".Build/Web/typo3/sysext/core/Build/UnitTests.xml"
- stage: test
php: 7.0
env:
- TYPO3_VERSION="^8.7" TESTING_FRAMEWORK="~1.3.0" PHPUNIT_VERSION="" UNITTEST_FOLDER="Tests/Unit/" UNITTEST_SUITE=".Build/Web/vendor/typo3/testing-framework/Resources/Core/Build/UnitTests.xml"
- stage: test
php: 7.1
env:
- TYPO3_VERSION="^8.7" TESTING_FRAMEWORK="~1.3.0" PHPUNIT_VERSION="" UNITTEST_FOLDER="Tests/Unit/" UNITTEST_SUITE=".Build/Web/vendor/typo3/testing-framework/Resources/Core/Build/UnitTests.xml"
- stage: test
php: 7.2
env:
- TYPO3_VERSION="^8.7" TESTING_FRAMEWORK="~1.3.0" PHPUNIT_VERSION="" UNITTEST_FOLDER="Tests/Unit/" UNITTEST_SUITE=".Build/Web/vendor/typo3/testing-framework/Resources/Core/Build/UnitTests.xml"
- stage: test
php: 7.2
env:
- TYPO3_VERSION="^9.5.0" TESTING_FRAMEWORK="~4.10.0" PHPUNIT_VERSION="" UNITTEST_FOLDER="Tests/Unit/" UNITTEST_SUITE=".Build/Web/vendor/typo3/testing-framework/Resources/Core/Build/UnitTests.xml"
- stage: test
php: 7.2
env:
- TYPO3_VERSION="dev-master as 10.0.0" TESTING_FRAMEWORK="~4.10.0" PHPUNIT_VERSION="" UNITTEST_FOLDER="Tests/Unit/" UNITTEST_SUITE=".Build/Web/vendor/typo3/testing-framework/Resources/Core/Build/UnitTests.xml"
- stage: publish in ter
if: tag IS present
php: 7.1
before_install: skip
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 requirements
composer require --dev helhum/ter-client dev-master
# Cleanup before we upload
git reset --hard HEAD && git clean -fx
# Set version number from tag
sed -i "s/version' => '.*'/version' => '${TRAVIS_TAG}'/" ext_emconf.php
# Upload
TAG_MESSAGE=`git tag -n10 -l $TRAVIS_TAG | sed 's/^[0-9.]*[ ]*//g'`
echo "Uploading release ${TRAVIS_TAG} to TER"
.Build/bin/ter-client upload extender . -u "$TYPO3_ORG_USERNAME" -p "$TYPO3_ORG_PASSWORD" -m "$TAG_MESSAGE"
fi;