What Is Travis CI
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:
language: node_js node_js: - stable install: - npm install script: - 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.