ninesalt / travis-ci-test

Example Travis CI configuration for a Node project.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Travis CI Test

Travis

Image of flow chart

Linking Repo with Travis CI

Open the Travis CI website and sign in with your GitHub account. Then choose any repository you want and link it with Travis CI. You then need to create a .travis.yml configuration file to configure Travis.

Example:

language: node_js

# test on 3 different version
node_js:
  - "8"
  - "7"
  - "6"

# send message in slack after build completes
notifications:
  slack: slack-token-here

You can also add other options in the configuration file:

before_install
after_success / after_failure
after_script
before_deploy
deploy
after_deploy

Running Tests

Whenever a commit is pushed to the repo, Travis automatically starts testing, in node.js, it automatically executed the default test script in package.json which is npm test. You can see the results of the test in the Travis CI website.

screenshot1

Documentation

Check out the documentation here for more information.

About

Example Travis CI configuration for a Node project.


Languages

Language:JavaScript 100.0%