> ## Documentation Index
> Fetch the complete documentation index at: https://docs.getlark.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# CI integration

> Run testing workflows as part of your deployment pipeline.

## Configuring CI

You can use the [Lark CLI](/cli) to run your testing workflows as part of your deployment. The `--wait` flag blocks until every workflow finishes and exits with a non-zero code on failure, so your pipeline fails if a test fails.

Set the `GETLARK_API_KEY` environment variable in your CI provider's secrets settings before adding the steps below.

### GitHub Actions

```yaml theme={null}
- name: Run Lark Tests
  run: npx -y @getlark/cli workflows invoke --all --wait
  env:
    GETLARK_API_KEY: ${{ secrets.GETLARK_API_KEY }}
```

### CircleCI

```yaml theme={null}
lark_tests:
  docker:
    - image: cimg/node:lts
  resource_class: small
  steps:
    - run:
        name: Run Lark Tests
        command: npx -y @getlark/cli workflows invoke --all --wait
```

### GitLab CI

```yaml theme={null}
lark_tests:
  image: node:lts
  script:
    - npx -y @getlark/cli workflows invoke --all --wait
```

<Tip>
  Each provider stores secrets in a different place. Add `GETLARK_API_KEY` under:

  * **GitHub Actions**: Settings → Secrets and variables → Actions
  * **CircleCI**: Project Settings → Environment Variables
  * **GitLab CI**: Settings → CI/CD → Variables
</Tip>
