CodeShip

Learn how to configure CodeShip to run your Rainforest tests.

Codeship is a hosted continuous integration (CI) server. Using the Rainforest CLI, it’s easy to configure CodeShip to run your Rainforest test suite after each deployment. We built a sample project on Github to show how we integrate with various CI tools, including CodeShip.

The Flow

Our project is configured to provide a continuous delivery flow by default. Every time code is pushed to the develop branch, CodeShip:

  1. Runs the automated tests.
  2. Installs the Rainforest CLI.
  3. Deploys the develop branch to a staging server.
  4. Runs the Rainforest tests using the Rainforest CLI on the staging server.

If any step fails, the build fails. This prevents the deployment of broken code to your users.

Getting Started with CodeShip

For information on how to use CodeShip, we encourage you to check out their documentation.

Configuring Your CodeShip Project

You must use the CodeShip web interface to configure your build. The first step in getting CodeShip to work with Rainforest is to install the Rainforest CLI in the configuration setup.

Add the following line to the setup section:

brew install rainforestapp/public/rainforest-cli
Installing the Rainforest CLI.Installing the Rainforest CLI.

Installing the Rainforest CLI.

You must provide CodeShip with your Rainforest API token to trigger the Rainforest run. Configure your Rainforest test data in the project’s settings. You can find your token on the Integrations settings page of your Rainforest account.

Create a RAINFOREST_TOKEN environment variable in CodeShip, and you’re done.

Configuring your Rainforest environment variable in CodeShip.Configuring your Rainforest environment variable in CodeShip.

Configuring your Rainforest environment variable in CodeShip.

The next step is to configure your deployment process for your staging server. In our example, we’re using Heroku. Refer to the CodeShip documentation if you’re using a different hosting provider.

Configuring your deployment pipeline.Configuring your deployment pipeline.

Configuring your deployment pipeline.

Testing Your Setup

Test your setup by committing a change to your develop branch and pushing it to your Git repository. CodeShip detects the change and deploys your code. This is how many of our customers increase their QA coverage and link Rainforest into their continuous delivery flow.


If you have any questions, reach out to us at [email protected] or via the chat bubble below.


Did this page help you?