Open mhl opened 7 years ago
Hmm looks like the tests are now correctly passing for this pull request but failing for the non-pull request build.
The error on Travis is:
error: pathspec 'master' did not match any file(s) known to git.
@mhl Any thoughts on why this might be and/or how we can workaround it?
Just looked into this and the error is because Travis does git clone --depth=50 --branch=check-tests-fail-on-target
, which implies the --single-branch
option, which means there is no history for the master
branch available 😕
Looking at https://travis-ci.org/everypolitician/everypolitician-popolo/builds/201902646 it seems that one of the builds has correctly found the word "refactor" in the pull request title but the other three haven't!
This is now passing on Travis, yay! I've changed things around a bit so that we're testing the pull request's branch name for the word "refactor" (case-insensitive) and then skipping the check-fail.sh
script if it's there.
Note: The code from this pull request shouldn't be used as-is without first changing the branch name check, which is currently checking for the word "check" in order to make this pull request pass 😆
Latest version of this script, which I've updated to be consistent with other EveryPolitician bash script that we run on Travis, is visible in https://github.com/everypolitician/scraped/pull/67.
Part of https://github.com/everypolitician/everypolitician/issues/573