Changes in App
add /.travis.yml
add
/tasks/_MY_APP_NAME_-dev.rake
(e.g. exhibits-dev.rake)
Changes in Github
In the repo settings
Webhooks (left menu)
- Turn off old webhooks
- click Edit beside webhook
- uncheck Active
- click Update webhook button
- Add Travis webhook
- click Add webhook button (above list)
- Payload URL: https://notify.travis-ci.org
Which events would you like to trigger this webhook? select Let me select individual events
- click Add webhook button
Branches (left menu)
- if Default branch (e.g. main, dev, etc.) is not listed under Branch protection rules, click Add rule button
- set Branch name pattern: default branch's name
- check Require status checks to pass before merging
- check continuous-integration/travis-ci
- click Save changes button
Changes in Travis
- turn on Travis for the repo
- login
- click user icon and select Settings
- in left menu, select organization
- in filter, search for repo name
- click switch button to turn on travis for that repo
Testing that it all works
Travis won't run until the next commit. To test, change a file (e.g. edit README.md and make a minor change), commit and push to GitHub in a branch. This will trigger the Travis build.