From d89e616a4ffd0c95cd7e8644df1a8cede0126bf8 Mon Sep 17 00:00:00 2001 From: digital-competence Date: Fri, 9 Dec 2016 13:01:09 +0100 Subject: [PATCH] FEATURE: Add travis ci (#1) * To automate tests and display results in pull requests. --- .travis.yml | 37 +++++++++++++++++++++++++++++++++++++ Makefile | 20 ++++++++++++++++++++ 2 files changed, 57 insertions(+) create mode 100644 .travis.yml create mode 100644 Makefile diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..3a7ae7b --- /dev/null +++ b/.travis.yml @@ -0,0 +1,37 @@ +language: php + +php: + - 5.6 + - 7.0 + +env: + matrix: + - TYPO3_VERSION="~6.2" + - TYPO3_VERSION="~7.6" + - TYPO3_VERSION="dev-master" + +matrix: + fast_finish: true + allow_failures: + - env: TYPO3_VERSION="~6.2" + php: 7.0 + - env: TYPO3_VERSION="dev-master" + php: 7.0 + exclude: + # TYPO3 no longer supports 5.6 + - env: TYPO3_VERSION="dev-master" + php: 5.6 + +before_install: + - composer self-update + - composer --version + +install: + - make install + +script: + - make Tests + +cache: + directories: + - $HOME/.composer/cache diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..ef9b947 --- /dev/null +++ b/Makefile @@ -0,0 +1,20 @@ +mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST))) +current_dir := $(dir $(mkfile_path)) + +TYPO3_WEB_DIR := $(current_dir).Build/Web +# Allow different versions on travis +TYPO3_VERSION ?= ~6.2 + +.PHONY: install +install: + rm -rf .Build + + composer require --dev --prefer-source typo3/cms="$(TYPO3_VERSION)" + composer update -vv + + git checkout composer.json + mkdir -p $(TYPO3_WEB_DIR)/uploads $(TYPO3_WEB_DIR)/typo3temp + +.PHONY: Tests +Tests: + TYPO3_PATH_WEB=$(TYPO3_WEB_DIR) .Build/bin/phpunit --colors --debug -v -c Tests/Unit/UnitTests.xml