Semaphore is a popular continuous integration service for
Ruby developers that integrates with GitHub. It also includes
Node.js, PhantomJS and headless Firefox in its platform,
This article assumes you already have a Semaphore account.
Configure Your Project
If you do not already have a
package.json in your project root,
create one now. This will both document your configuration and
make it easy to run your tests. Here's an example:
'test': './node_modules/.bin/karma start --single-run --browsers PhantomJS'
Another option is to use Firefox as your test browser. To do this, change
the last part to:
'test': './node_modules/.bin/karma start --single-run --browsers Firefox'
npm test within your project will run your tests with Karma.
Add Your Project to Semaphore
Follow the process as shown in the screencast on the Semaphore homepage.
After the analysis is finished, ignore the Ruby version Semaphore has set
for you, choose to customize your build commands and use these:
That's it - proceed to your first build. In case you're using Firefox as
your test browser, Semaphore will automatically run it in a virtual screen
during your builds.
Also, if necessary, build commands can be further customized at any time.