From 6114da7389f4f0c36888f9b32fdc3ebdcc8811e5 Mon Sep 17 00:00:00 2001 From: Elis Hirwing Date: Sat, 21 Oct 2017 22:28:36 +0200 Subject: [PATCH] Refactor how integration tests are triggered --- .travis.yml | 10 ++++++---- Makefile | 5 ----- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/.travis.yml b/.travis.yml index dda37dc..02a7429 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,6 +5,7 @@ sudo: false matrix: allow_failures: - env: EVM_EMACS=emacs-git-snapshot-travis + - env: INTEGRATION=yes env: - EVM_EMACS=emacs-24.3-travis @@ -14,6 +15,7 @@ env: - EVM_EMACS=emacs-25.2-travis - EVM_EMACS=emacs-25.3-travis - EVM_EMACS=emacs-git-snapshot-travis + - INTEGRATION=yes before_install: # Get install script @@ -23,16 +25,16 @@ before_install: - evm install emacs-24.4-travis --use --skip install: - # Install the emacs version that we're testing today - - evm install $EVM_EMACS --use --skip + # If we're running unit-tests, install the emacs version that we're testing today. Otherwise go with 25.3 for integration tests + - test -n "$EVM_EMACS" && evm install $EVM_EMACS --use --skip || evm install emacs-25.3-travis --use --skip # Install your dependencies - EMACS="/home/travis/.evm/bin/emacs" cask install script: # Print travis event type (might be cron or something else) - - echo $TRAVIS_EVENT_TYPE - emacs --version # Run tests - - env CASK='EMACS=/home/travis/.evm/bin/emacs cask' make test + - test -n "$EVM_EMACS" && env CASK='EMACS=/home/travis/.evm/bin/emacs cask' make test || true + - test -n "$INTEGRATION" && env CASK='EMACS=/home/travis/.evm/bin/emacs cask' make integration || true diff --git a/Makefile b/Makefile index 2425745..16712d9 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,3 @@ -TRAVIS_EVENT_TYPE ?= push EMACS ?= emacs CASK ?= cask @@ -15,10 +14,6 @@ test: unit: ${CASK} exec buttercup -L . tests/unit/ - @if [ "$(TRAVIS_EVENT_TYPE)" = "cron" ]; then \ - ${MAKE} integration; \ - fi - # Run all tests in tests/integration/ integration: ${CASK} exec buttercup -L . tests/integration/