1. Help Center
  2. Testcontainers Cloud for CI

How to use Testcontainers Cloud with CircleCI

Make sure TC_CLOUD_TOKEN is set to your corresponding token value, download the agent and start it.

To use Testcontainers Cloud with CircleCI you need to set TC_CLOUD_TOKEN to your corresponding service account token. You can generate the token in the Testcontainers Cloud dashboard. Then add the token to your CircleCI workflow by setting the environment variable in your CircleCI Project Settings .
Next you need to configure your CircleCI workflow to install and use Testcontainers Cloud.  You can add the testcontainers-cloud-orb setup as a pre-step to your CircleCI Job. And configure it to start the Testcontainers Cloud agent before running the tests.
You can use the following script to add the steps to your workflow, note the "tcc:" orb, and the "tcc/setup" config in the "pre-steps": 
version: "2.1"
tcc: atomicjar/testcontainers-cloud-orb@0.1.0
- job_name:
# ... existing steps go here (run tests, etc.)
- tcc/setup