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.

  1. 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
  1. Add your token to the repository secrets as you did in step one, and give it the name GH_PAT.

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

...
- uses: antithesishq/antithesis-trigger-action@v0.4
  with:
    notebook_name: <test name>
    tenant: <subdomain>
    username: ${{ secrets.ANTITHESIS_USER_NAME }}
    password: ${{ secrets.ANTITHESIS_PASSWORD }}
    github_token: ${{ secrets.GH_PAT }}
    images: <images> mycontainer1@digest,mycontainer2:tag
...

Where the variables have the following definitions:

<test_name>

the basic auth user and password for your tenant (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

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

Integrating with CircleCI#

Coming Soon!

Integrating with other CI systems#

Coming Soon!