Skip to content

Commit

Permalink
Switch to travis build stages (#51)
Browse files Browse the repository at this point in the history
  • Loading branch information
helhum authored Aug 12, 2018
1 parent 0c7e5ee commit 18d6971
Showing 1 changed file with 51 additions and 38 deletions.
89 changes: 51 additions & 38 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,6 @@ branches:
- master
- /^([0-9]+\.){1,2}(x|[0-9]+)$/

matrix:
include:
- php: 7.2
env: TYPO3_VERSION=^8.7
- php: 7.1
env: TYPO3_VERSION=^8.7
- php: 7.0
env: TYPO3_VERSION=^8.7
- php: 7.2
env: TYPO3_VERSION=^7.6
- php: 7.1
env: TYPO3_VERSION=^7.6
- php: 7.0
env: TYPO3_VERSION=^7.6
- php: 5.6
env: TYPO3_VERSION=^7.6
- php: 5.5
env: TYPO3_VERSION=^7.6
- php: 5.6
env: TYPO3_VERSION=^6.2
- php: 5.5
env: TYPO3_VERSION=^6.2

notifications:
email:
- typo3@helhum.io
Expand All @@ -45,7 +22,7 @@ addons:
before_install:
- phpenv config-rm xdebug.ini

before_script:
install:
- composer require typo3/cms=$TYPO3_VERSION
- export TYPO3_PATH_WEB="$PWD/.Build/Web"

Expand All @@ -68,18 +45,54 @@ script:
export typo3DatabasePassword="";
find 'Tests/Functional' -wholename '*Test.php' | parallel --gnu 'echo; echo "Running functional test suite {}"; .Build/bin/phpunit -c .Build/vendor/nimut/testing-framework/res/Configuration/FunctionalTests.xml {}'
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
composer require --dev helhum/ter-client
# Cleanup before we upload
git reset --hard HEAD && git clean -fx
jobs:
fast_finish: true
include:
- stage: test
php: 7.2
env: TYPO3_VERSION=^8.7
- stage: test
php: 7.1
env: TYPO3_VERSION=^8.7
- stage: test
php: 7.0
env: TYPO3_VERSION=^8.7
- stage: test
php: 7.2
env: TYPO3_VERSION="^7.6"
- stage: test
php: 7.1
env: TYPO3_VERSION="^7.6"
- stage: test
php: 7.0
env: TYPO3_VERSION="^7.6"
- stage: test
php: 5.6
env: TYPO3_VERSION=^7.6
- stage: test
php: 5.5
env: TYPO3_VERSION=^7.6
- stage: test
php: 5.6
env: TYPO3_VERSION=^6.2
- stage: test
php: 5.5
env: TYPO3_VERSION=^6.2

- 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
TAG_MESSAGE=`git tag -n10 -l $TRAVIS_TAG | sed 's/^[0-9.]*[ ]*//g'`
echo "Uploading release ${TRAVIS_TAG} to TER"
.Build/bin/upload typoscript_rendering . -u "$TYPO3_ORG_USERNAME" -p "$TYPO3_ORG_PASSWORD" -m "$TAG_MESSAGE"
fi;
fi;
# 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 typoscript_rendering . -u "$TYPO3_ORG_USERNAME" -p "$TYPO3_ORG_PASSWORD" -m "$TAG_MESSAGE"
fi;

0 comments on commit 18d6971

Please sign in to comment.