Merge pull request #1295 from blueyed/travis-fix-test-each-commit
Travis: fix testing each commit
This commit is contained in:
commit
44698ed227
18
.travis.yml
18
.travis.yml
|
@ -115,13 +115,11 @@ install:
|
||||||
# Functions for custom Travis folds.
|
# Functions for custom Travis folds.
|
||||||
- |
|
- |
|
||||||
travis_fold_start() {
|
travis_fold_start() {
|
||||||
echo -n "travis_"
|
travis_fold start "$1"
|
||||||
echo "fold:start:$1"
|
|
||||||
travis_fold_current="$1"
|
travis_fold_current="$1"
|
||||||
}
|
}
|
||||||
travis_fold_end() {
|
travis_fold_end() {
|
||||||
echo -n "travis_"
|
travis_fold end "$travis_fold_current"
|
||||||
echo "fold:end:$travis_fold_current"
|
|
||||||
}
|
}
|
||||||
travis_run_in_fold() {
|
travis_run_in_fold() {
|
||||||
travis_fold_start "$1"
|
travis_fold_start "$1"
|
||||||
|
@ -181,12 +179,14 @@ script:
|
||||||
set -ev
|
set -ev
|
||||||
if [ "$TEST_PREV_COMMITS" = 1 ] && ! [ "$TRAVIS_PULL_REQUEST" = false ]; then
|
if [ "$TEST_PREV_COMMITS" = 1 ] && ! [ "$TRAVIS_PULL_REQUEST" = false ]; then
|
||||||
# Check each commit separately (to make git-bisect less annoying).
|
# Check each commit separately (to make git-bisect less annoying).
|
||||||
echo "Testing previous commits based on TRAVIS_COMMIT_RANGE=$TRAVIS_COMMIT_RANGE"
|
# Fix Travis' commit range (https://github.com/travis-ci/travis-ci/issues/4596).
|
||||||
rev_list="$(git rev-list --bisect-all $TRAVIS_COMMIT_RANGE)"
|
commit_range="${TRAVIS_COMMIT_RANGE/.../..}"
|
||||||
|
echo "Testing previous commits ($commit_range)"
|
||||||
|
rev_list="$(git rev-list --bisect-all $commit_range)"
|
||||||
echo "rev-list: $rev_list"
|
echo "rev-list: $rev_list"
|
||||||
commits="$(echo $rev_list | grep -v 'dist=0' | cut -d\ -f 1)"
|
commits="$(echo "$rev_list" | grep -v 'dist=0' | cut -d\ -f 1)"
|
||||||
echo "Testing commits: $commits"
|
n="$(echo "$commits" | wc -l)"
|
||||||
n="$(echo commits | wc -l)"
|
echo "Testing $n commits: $commits"
|
||||||
i=0
|
i=0
|
||||||
failed=
|
failed=
|
||||||
for commit in $commits; do
|
for commit in $commits; do
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/sh
|
#!/usr/bin/env bash
|
||||||
#
|
#
|
||||||
# Process (API) docs after a successful build on Travis (via ../.travis.yml).
|
# Process (API) docs after a successful build on Travis (via ../.travis.yml).
|
||||||
#
|
#
|
||||||
|
@ -76,7 +76,7 @@ COMMIT_MSG="Update docs for $AWESOME_VERSION via Travis
|
||||||
Last commit message:
|
Last commit message:
|
||||||
$LAST_COMMIT_MSG
|
$LAST_COMMIT_MSG
|
||||||
|
|
||||||
Commits: https://github.com/awesomeWM/awesome/compare/${TRAVIS_COMMIT_RANGE}
|
Commits: https://github.com/awesomeWM/awesome/compare/${TRAVIS_COMMIT_RANGE/.../..}
|
||||||
Build URL: https://travis-ci.org/awesomeWM/awesome/builds/${TRAVIS_BUILD_ID}"
|
Build URL: https://travis-ci.org/awesomeWM/awesome/builds/${TRAVIS_BUILD_ID}"
|
||||||
git commit -m "[relevant] $COMMIT_MSG"
|
git commit -m "[relevant] $COMMIT_MSG"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue