Our organization uses travis-ci
within github
for basic sanity checking when a change is committed. Is there a way to prevent a full travis build/run when changes to specific files or file types are made?
As the simplest example: if someone makes a change to the README.md file and wants to commit directly to master, we don't need to do a CI run before allowing this.
Configuration. Travis CI is configured by adding a file named . travis. yml , which is a YAML format text file, to the root directory of the repository.
Trigger Travis CI builds using the API V3 by sending a POST request to /repo/{slug|id}/requests : Get an API token from your Travis CI settings page. You'll need the token to authenticate most of these API requests.
You might instruct your team to add [skip ci]
to your commit messages, e.g.
git commit -m "updated readme [skip ci]"
.
This means that this Github commit (after it is pushed) will not trigger a Travis-CI run.
The alternative is to accept that a commit triggers a Travis-CI run, but then simply do condition checks inside your .travis.yml
(or scripts executed by it) to exclude processing of unit-tests, etc.
In other words: there will be a CI run, but all heavy script stuff could be skipped.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With