Skip to content

matthewdking/CI-research

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CI-research

Build Status

Continuous integration research afternoon

What is CI?

  • development practice that requires developers to integrate code to a shared repository several times a day. Each check in is then verified by an automated build which allows teams to detect problems earlier.
  • by integrating regularly you can detect errors quickly and locate them easily

Pros

  • early detection of errors
  • cheaper, shorter periods between integrations
  • spend less time debugging
  • stop waiting to find out if your code’s going to work

Cons

  • frequent commits
  • hard to divide into tiny chunks
  • hard to write tests
  • if project is already ongoing difficult to implement CI

Travis

  • every time you commit and push to github travis will run the test script automatically

How to use

  • must have node.js installed locally
  • sign up using github
  • authorise application
  • turn on the repository you want travis to build
  • create project files .travis.yml with:
language: node_js
node_js: 8.2.1
  • run npm init to create package.json
  • specify test script eg
"scripts": {
  "test": "istanbul cover tape test.js | tap-spec"
}

Example case

Failing tests

This is the output you can expect from a failing test.

travis failing test on travis site

Failing travis tests on github.

travis failing test

Solved the failing tests

This is the output you can expect when all the tests pass.

travis passing tests

Passing tests on github.

travis passing tests on github

and if all your tests fail...

stefano meme

About

continuous integration research afternoon

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published