CI integration

Integrating with GitHub Actions

Antithesis provides native integration with GitHub Actions via the Antithesis Trigger Action. You can easily trigger a test run via a GitHub action and have the results reported back natively in GitHub by following these steps:

  1. Add your Antithesis username and password to your GitHub repository secrets and variables. Navigate to your repository action secrets settings found at https://github.com/<org_name>/<repo_name>/settings/secrets/actions. Add a new repository secret, and give it the name ANTITHESIS_USER_NAME to store your Antithesis username. Add another secret, and give it the name ANTITHESIS_PASSWORD to store your Antithesis password.

  2. Create a limited scope PAT token to enable Antithesis to post back results to Github. Navigate to your fine-grained access token settings found here and create a limited scope fine-grained access token with minimal permissions. It is recommended to limit the token to the repository running the workflow and to only grant the token permission to read the repository metadata and to read/write the commit status. For example:
    Github PAT token permissions example

  3. Add your token to the repository secrets as you did in step one, and give it the name GH_PAT.

  4. Call the Antithesis Trigger Action in your workflow file by adding the following code:

...
- uses: antithesishq/antithesis-trigger-action@v0.6
  with:
    notebook_name: <notebook_name>
    tenant: <subdomain>
    username: $
    password: $
    github_token: $
    images: <images>
    config_image: <config_image>
    description: <description>
    email_recipients: <emails>
    test_name: <test_name>
    additional_parameters: |-
      parameter1_name=parameter1_value
      parameter2_name=parameter2_value
...

Where the variables have the following definitions:

Variable Description
<notebook_name> The name of your test that will be run (provided by Antithesis)
<subdomain> The subdomain for the tenant (e.g. $TENANT_NAME.antithesis.com)
<images> The image versions that Antithesis will pull from the container registry to test. This is a ‘;’ delimited list. Each entry in the list specifies the container name and either a digest (recommended) or a tag in this format NAME[:TAG|@DIGEST]. e.g. container_1@sha25612341234;container_2:latest_tag
<config_image> The image version of your config image. Antithesis will pull this image version from the container registry. This should be a single image version.
<description> A string description of your test run. The description will be in the headers of the generated report and of any emails triggered by the test run.
<emails> Recipients who will receive emailed links to the triage report produced by this test run. If this parameter is not specified, emails will be sent to the default users set up for the endpoint. This is a A ‘;’ delimited list. Each entry is an email address. e.g. u1@site.com;u2@site.com
additional_parameters A newline-seperated list of additional parameters to be sent to the test run.
test_name An optional name for the test you are running. When specified, the git commit’s status context will be continuous-testing/antithesis (test_name). Otherwise, the default context is continuous-testing/antithesis. This enables users to run more than one Antithesis test per commit.

You can see an end-to-end example in our sample project.

Integrating with CircleCI

Coming Soon!

Integrating with other CI systems

Coming Soon!