forked from TYPO3-Console/TYPO3-Console
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
138 lines (127 loc) · 4.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
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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
language: php
sudo: required
addons:
sonarcloud:
organization: "helhum-github"
branches:
- master
- develop
jdk:
- oraclejdk8
cache:
directories:
- $HOME/.composer/cache
- $HOME/.sonar/cache
# Do not build feature branches or alpha/beta releases
branches:
only:
- master
- develop
- /^([0-9]+\.){1,2}(x|[0-9]+)$/
# Inform me about failures
notifications:
email:
# This is executed for all stages
before_install:
- if php -i | grep -v TRAVIS_CMD | grep -q xdebug; then phpenv config-rm xdebug.ini; fi
- mkdir -p .Build/external
- git clone https://github.com/helhum/TYPO3-testing-framework.git .Build/external/nimut-testing-framework -b allow-php73
- composer config repositories.testing-framework vcs .Build/external/nimut-testing-framework
install:
- export COMPOSER_ROOT_VERSION=5.6.0
- |
composer require \
typo3/cms-backend="$TYPO3_VERSION" \
typo3/cms-core="$TYPO3_VERSION" \
typo3/cms-extbase="$TYPO3_VERSION" \
typo3/cms-extensionmanager="$TYPO3_VERSION" \
typo3/cms-fluid="$TYPO3_VERSION" \
typo3/cms-frontend="$TYPO3_VERSION" \
typo3/cms-install="$TYPO3_VERSION" \
typo3/cms-scheduler="$TYPO3_VERSION" \
typo3/cms-recordlist="$TYPO3_VERSION" \
$PREFER_LOWEST
- git checkout composer.json
# Test scripts
script:
- .Build/bin/parallel-lint --exclude .Build .
# This fails when command reference is not up to date
- ./typo3cms commandreference:render > /dev/null 2>&1 && test -z "$(git diff --shortstat 2> /dev/null | tail -n1)";
- git diff
- .Build/bin/phpunit;
# Configure build stages (with build matrix above, test stage is implicitly defined)
jobs:
allow_failures:
- env: TYPO3_VERSION="dev-master"
include:
- stage: test
php: 7.3
env: TYPO3_VERSION="~9.5.0" TYPO3_UPGRADE_FROM_VERSION="~9.5.0"
- stage: test
php: 7.2
env: TYPO3_VERSION="~9.5.0"
- stage: test
php: 7.2
env: TYPO3_VERSION=^8.7.22
- stage: test
php: 7.1
env: TYPO3_VERSION=^8.7.22
- stage: test
php: 7.0
env: TYPO3_VERSION=^8.7.22
- stage: test
php: 7.0
env: TYPO3_VERSION=^8.7.22 PREFER_LOWEST="--prefer-lowest"
- stage: test
php: 7.2
env: TYPO3_VERSION="dev-master"
- stage: test
php: 7.0
env: Consistency checks
install: skip
before_script: skip
script:
- >
if [ -n "$TRAVIS_TAG" ]; then
composer set-version $TRAVIS_TAG
test -z "$(git diff --shortstat 2> /dev/null | tail -n1)";
fi
- composer extension-verify-composer-json
- composer extension-create-libs
- stage: sonar code scanner
if: type = push AND branch IN (master, develop)
php: 7.2
before_install: skip
install: skip
before_script:
- mkdir -p .Build/external
- git clone https://github.com/helhum/TYPO3-testing-framework.git .Build/external/nimut-testing-framework -b allow-php73
- composer config repositories.testing-framework vcs .Build/external/nimut-testing-framework
script:
- git fetch --unshallow
- export COMPOSER_ROOT_VERSION=5.6.0
- composer install
- .Build/bin/phpunit --whitelist Classes --coverage-clover .Build/clover.xml --log-junit .Build/junit.xml
- >
if [ -n "$SONAR_TOKEN" ]; then
sonar-scanner
fi
- stage: 🚢 to TER
if: tag IS present
php: 7.0
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 tag -n10 -l $TRAVIS_TAG | sed 's/^[0-9.]*[ ]*//g'`
echo "Uploading release ${TRAVIS_TAG} to TER"
$HOME/.composer/vendor/bin/ter-client upload typo3_console . -u "$TYPO3_ORG_USERNAME" -p "$TYPO3_ORG_PASSWORD" -m "$TAG_MESSAGE"
fi;