From 21aea7d5a4ab82ef8fe1fbd973a63f9b979920f6 Mon Sep 17 00:00:00 2001 From: Sheogorath <sheogorath@shivering-isles.com> Date: Tue, 15 Jan 2019 02:17:36 +0100 Subject: [PATCH] Add script to merge master before testing Travis CI provides feedback about a change at the timeit's purpose and how it works in it's own system. What it doesn't tell is if it's breaking our master branch or not. This patch adds some bash scripting that merges master before running tests on PR to make sure it doesn't break the master branch. This will also allow to fix the master and then merge other changes without the need to rebase the changes to validate it works now. --- .travis.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.travis.yml b/.travis.yml index cd622e0..8b3385b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,6 +14,14 @@ env: before_install: - sudo apt-get -qq update - sudo apt-get install -y parallel + # Test changed when they are merged into master branch. + - set -e; + if [ "$TRAVIS_PULL_REQUEST" != "false" ] && [ "$TRAVIS_BRANCH" != "master" ]; then + export GIT_COMMITTER_EMAIL=no-reply+travis@codimd.org; + export GIT_COMMITTER_NAME='Travis CI'; + git checkout master; + git merge "$TRAVIS_COMMIT"; + fi install: # Build images -- GitLab