forked from TYPO3-Console/TYPO3-Console
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
95 lines (82 loc) · 3.32 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
language: php
branches:
only:
- master
- 1.1.x
- develop
php:
- 5.5
- 5.6
- 7
env:
- TYPO3_VERSION=^7.6.0
- TYPO3_VERSION=dev-master
matrix:
allow_failures:
- env: TYPO3_VERSION=dev-master
exclude:
- php: 5.5
env: TYPO3_VERSION=dev-master
- php: 5.6
env: TYPO3_VERSION=dev-master
sudo: false
cache:
directories:
- $HOME/.composer/cache
addons:
apt:
packages:
- parallel
notifications:
email:
before_install:
- phpenv config-rm xdebug.ini
- composer self-update
- composer --version
- if [ "$GITHUB_COMPOSER_AUTH" ]; then composer config -g github-oauth.github.com $GITHUB_COMPOSER_AUTH; fi
before_script:
- composer require typo3/cms=$TYPO3_VERSION
- export PATH_WEB=".Build/Web"
script:
- >
echo;
echo "Running unit tests";
TYPO3_PATH_WEB="$PATH_WEB" .Build/bin/phpunit -c .Build/vendor/typo3/cms/typo3/sysext/core/Build/UnitTests.xml Tests/Unit/
- >
echo;
echo "Running php lint";
find . -name \*.php ! -path "./.Build/*" | parallel --gnu php -d display_errors=stderr -l {} > /dev/null \;
# Basic functional tests - all commands should exit with 0
- ./typo3cms help && [ ! -f "$PATH_WEB/typo3conf/PackageStates.php" ]
- ./typo3cms install:setup --non-interactive --database-user-name="root" --database-host-name="localhost" --database-port="3306" --database-name="travis_test" --admin-user-name="admin" --admin-password="password" --site-name="Travis Install"
- ./typo3cms help
- ./typo3cms backend:lock
- ./typo3cms backend:unlock
- ./typo3cms cache:flush
- ./typo3cms cache:listgroups
- ./typo3cms cleanup:updatereferenceindex
- ./typo3cms database:updateschema "*"
- ./typo3cms frontend:request / > /dev/null
- ./typo3cms documentation:generatexsd TYPO3\\CMS\\Fluid\\ViewHelpers > /dev/null
- ./typo3cms configuration:show BE/installToolPassword
- ./typo3cms configuration:showLocal BE/installToolPassword
- ./typo3cms configuration:showActive BE/installToolPassword
- ./typo3cms configuration:set BE/installToolPassword foobar && grep installToolPassword $PATH_WEB/typo3conf/LocalConfiguration.php | grep foobar
- ./typo3cms configuration:remove BE/installToolPassword --force && [ -z "$(grep installToolPassword $PATH_WEB/typo3conf/LocalConfiguration.php)" ]
- ./typo3cms configuration:set BE/installToolPassword blablupp && grep installToolPassword $PATH_WEB/typo3conf/LocalConfiguration.php | grep blablupp
- rm -f $PATH_WEB/typo3conf/PackageStates.php && ./typo3cms install:generatepackagestates && [ -f "$PATH_WEB/typo3conf/PackageStates.php" ]
- rm $PATH_WEB/typo3temp/index.html && ./typo3cms install:fixfolderstructure && [ -f "$PATH_WEB/typo3temp/index.html" ]
after_script:
- >
if [ -n "$TRAVIS_TAG" ] && [ -n "$TYPO3_ORG_USERNAME" ] && [ -n "$TYPO3_ORG_PASSWORD" ]; then
echo -e "Preparing upload of release ${TRAVIS_TAG} to TER\n"
curl -sSL https://raw.githubusercontent.com/alrra/travis-after-all/1.4.4/lib/travis-after-all.js | node
if [ $? -eq 0 ]; then
# Cleanup before we upload
git reset --hard HEAD && git clean -fx
TAG_MESSAGE=`git tag -n10 -l $TRAVIS_TAG | sed 's/^[0-9.]*[ ]*//g'`
echo "Uploading release ${TRAVIS_TAG} to TER"
.Build/bin/upload . "$TYPO3_ORG_USERNAME" "$TYPO3_ORG_PASSWORD" "$TAG_MESSAGE"
fi;
fi;