- Run
npm test
to ensure tests are working correctly locally - Create
.travis.yml
file in repo - Add the following to configure for
node
language: node_js
node_js: node
- Commit your changes, but don't push to GitHub yet.
Activate - On Travis:
- Go to Profile: User (in upper-right) > Accounts
- Click "Sync Account"
- Activate repo
- Push your changes to Github to trigger the git hook
- Watch Travis the build and test
Configure Heroku Pipeline on Heroku
- Go to: Personal Apps > PROJECT NAME > Deploy
- Under "Deployment method" choose GitHub
- Under "Connect to GitHub" choose the account and repo to deploy
- Under "Automatic deploys" choose the branch to deploy from
- Important - Check "Wait for CI to pass before deploy" checkbox
- Click "Enable Automatic Deploys"
- Commit and push to trigger the process
Add a Travis CI badge to your repo
- On Travis CI, find your project and click on the badge
- Change the dropdown menu to "Markdown" and copy the output
- Add the badge code to your
readme.md
file, commit and push - The code looks something like this:
[](https://travis-ci.org/<USERNAME>/<REPO-NAME>)