Skip to content
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
Cannot retrieve contributors at this time

Development Guide

Build status

Local Setup

Cog depends on a few things to run locally:

* Postgres (9.4+)
* A `SLACK_API_TOKEN` environment variable (with a valid token)

With those installed, setup your computer with:

$ mix cog.setup

Run Cog

$ make run

Cog will be run on http://localhost:4000.

Notes on Relay

If you are running cog with relay, which you probably should be, note that this version of cog does not work with the old elixir based relay. To use relay use the new go based version, (


Preliminary database setup:

$ MIX_ENV=test make reset-db

Unit Tests:

$ make test-unit

Pipeline Integration Tests:

$ make test-integration

Slack Integration Tests

$ make test-slack

Hipchat Integration Tests

$ make test-hipchat

Slack and HipChat tests require credentials provided as environment variables. See the SLACK_* and HIPCHAT_* variables, respectively, in The Cog Book

HTTP requests in integration tests are recorded and stubbed out for future test runs. Recording new cassettes, json files of serialized requests and responses, happens automatically when using the Cog.VCR.use_cassette macro. To regenerate these stubs by making actual HTTP requests delete the files you wish to regenerate and run the tests.