Reputation: 48606
Is there a way to specify in my .travis.yml
for a repo repo_x
that I do not want to clone that repo or check out any of its branches?
For example, if I have a Homebrew Tap I'm testing, I will be acquiring the components I want to test with brew tap
and brew install
and will have no need of any of the contents of the Tap's repo.
Upvotes: 1
Views: 642
Reputation: 41648
From https://docs.travis-ci.com/user/customizing-the-build/#disabling-git-clone :
Disabling git clone
In some workflows, like build stages, it might be beneficial to skip the automatic git clone step.
You can do this by adding:
git: clone: false
Note that if you use this option, the TRAVIS_COMMIT_MESSAGE environment variable will not be defined.
Upvotes: 0
Reputation: 2881
Interesting question and idea!
In looking at the .travis.yml
parser code, there seems to be 3 (possibly 4 options):
git clone --depth=0
is invalid because git returns fatal: depth 0 is not a positive number
The best strategy for an efficient "minimal clone time/impact" for travis may be the following:
git:
quiet: true
depth = 1
submodules = false
Upvotes: 0