> ## CI integration

> Fetch the complete documentation index at: https://antithesis.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

---

## Integrating with GitHub Actions

Antithesis provides native integration with [GitHub Actions](https://docs.github.com/en/actions) via the [Antithesis Trigger Action](https://github.com/antithesishq/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_USERNAME` 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](https://github.com/settings/tokens?type=beta) 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:

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](https://github.com/antithesishq/antithesis-trigger-action) in your workflow file by adding the following code:

```yaml
...
- uses: antithesishq/antithesis-trigger-action@v0.8
  with:
    notebook_name: <notebook_name>
    tenant: <tenant_name>
    username: ${{ secrets.ANTITHESIS_USERNAME }}
    password: ${{ secrets.ANTITHESIS_PASSWORD }}
    github_token: ${{ secrets.GH_PAT }}
    images: <images>
    config_image: <config_image>
    description: <description>
    email_recipients: <emails>
    test_name: <test_name>
    additional_parameters: |-
      parameter1_name=parameter1_value
      antithesis.integrations.discord.callback_url=<discord_callback_url>
      antithesis.integrations.discord.token=<discord_secret>
      parameter2_name=parameter2_value
      antithesis.integrations.slack.callback_url=<slack_callback_url>
      antithesis.integrations.slack.token=<slack_secret>
...
```

Where the variables have the following definitions:

| Variable | Description |
|----------|-------------|
| `<notebook_name>` | The name of your test that will be run (provided by Antithesis) |
| `<tenant_name>` | Your tenant's name (e.g. If your subdomain is `$TENANT_NAME.antithesis.com`, your tenant name is `$TENANT_NAME`) |
| `<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. |
| `<discord_callback_url>` | Your Discord callback URL to post the results of test runs back to Discord. |
| `<discord_secret>` | Your Discord secret token. |
| `<slack_callback_url>` | Your Slack callback URL to post the results of test runs back to Slack. |
| `<slack_secret>` | Your Slack secret token. |

You can see an end-to-end example in our [sample project](https://github.com/antithesishq/glitch-grid).

> **Note**
>
> We recommend always pinning to a version when integrating with GitHub Actions. Not doing so can cause you to use unreleased code.

## Integrating with CircleCI

Coming Soon!

## Integrating with other CI systems

Coming Soon!
