Travis CI is a continuous integration tool, it integrates into Github easily and will run your unit tests on every commit to your repo and email you the results. The best part... it's free for open source projects! To get started you will need to create an account with Travis CI here.
Sign in with your Github account and head over to the repositories page, 'https://travis-ci.org/account/repositories'
From this page, you will see a list of all your public Github repos. To start a CiCd pipeline, simply click the enabled button:
- npm install
- npm test
The last thing that I recommend you do is add the state of your build to your Github repo. You may have noticed those cool little badges on some peoples Git repos, like this one:
Adding this to your repo is simply a matter of creating a readme file and adding some config into it. Log into Travis, go to the repo page and find your project and click the setting button.
Next, click the build icon against your project:
From the pop-up, ensure that markdown is selected from the drop-down.
Next, copy the next at the bottom and add that to your readme file. Commit and push it and you should now see the build status when you view your readme in your repo.
Software Architect, Programmer and Technologist Jon Jones is founder and CEO of London-based tech firm Digital Prompt. He has been working in the field for nearly a decade, specializing in new technologies and technical solution research in the web business. A passionate blogger by heart , speaker & consultant from England.. always on the hunt for the next challenge