In the previous video, we created a new GitHub repo and pushed our local code up to the new repository. Finally we test by installing this Node.js Hapi plugin directly from GitHub.
This video picks up where we left off and we configure travis-ci for our repo so that we can get automated build each time we push to GitHub. Errors will be reported to us automatically.
- Enable travis-ci for repo
- Trigger build with test hook
- Push change to run build
- Episode: CW V008
- Skill level: Beginner with basic git and npm skills
- Basic Node.js & npm
- Basic Git skills
- Published: July 1st, 2014
- Tags: js, nodejs,git,travis-ci,ci,hapi,plugin,free
- Duration: 4:43
- Node.js version: 0.10.25
- Git version: 188.8.131.52
- Travis-CI - Sign up for free using your GitHub account. The free account allows you to build against your open source public repos. Paid accounts allow building of private repos along with additional features and priority builds.
.travis.ymlcontains the configuration for Travis-CI
- Travis runs
npm installfollowed by
npm-testto test both the installation of your modules and to run your tests.
- You may configure the versions of Node.js you want to test your project on
- By using Travis-CI builds are run on all the configured versions every time you push to GitHub and errors are emailed back to you or you can view in their dashboard.
- We add the travis-ci image into our README so users can see whether our code is passing tests on all the configured versions of Node.js. The images is also linked so it takes users directly to the Travis-CI dashboard for this project so they can see the history of the project and guage its stability.
- hapi-elapsed - repo on GitHub
- Travis-CI hapi-elapsed dashboard
Example Travis-CI config file
Specifies node_js as the language and we will run against Node.js 0.10 and Node.js 0.11
language: node_js node_js: - "0.10" - "0.11"
In the next video
- Tag version
- Publish in NPM registry
- Install from registry