I'm building my project with two branches (master and dev) on Travis-CI.
I've configured it so that when Travis-CI fails to build my branch dev, it would execute the following command automatically to find the buggy commit for me:
$ git bisect start HEAD master --
However, it immediately outputs:
'master' does not appear to be a valid revision
I just learned that if the local repository has no branch named master, Git will prompt this error.
But how can I figure it out what happened on Travis-CI?
My files are listed as followed:
.travis.yml
language: python
python:
- "3.6"
# caches `$HOME/.cache/pip`
cache: pip
sudo: false
branches:
only:
- master
- dev
git:
depth: 3
################## JOB LIFECYCLE ##################
# command to install dependencies
before_intall:
- python -m pip install -r requirements.txt
install:
- python setup.py install
# command to run tests
before_script:
- python -m pytest --version
script:
- python -m pytest
before_cache:
- rm -f $HOME/.cache/pip/log/debug.log
after_success:
after_failure:
- cd test/ && ./bisect.sh
before_deploy:
deploy:
after_deploy:
after_script:
###################################################
matrix:
fast_finish: true
bisect.sh
#!/bin/bash
EXEC_TEST=pytest
# Run tests automatically
git bisect start HEAD master --
git bisect run $EXEC_TEST
# Logging bisect history
git bisect log
# Quit bisect
git bisect reset
Travis-CI build output:
$ chmod u+x bisect.sh && ./bisect.sh
'master' does not appear to be a valid revision
You need to start by "git bisect start".
You then need to give me at least one good|old and one bad|new revision.
(You can use "git bisect bad|new" and "git bisect good|old" for that.)
We are not bisecting.
We are not bisecting.
Raw log can be found here.