Skip to main content

Configuring CI

You can use the LarkCI 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 LARKCI_API_KEY environment variable in your CI provider’s secrets settings before adding the steps below.

GitHub Actions

- name: Run LarkCI Tests
  run: npx -y larkci@latest workflows invoke --all --wait
  env:
    LARKCI_API_KEY: ${{ secrets.LARKCI_API_KEY }}

CircleCI

larkci_tests:
  docker:
    - image: cimg/node:lts
  resource_class: small
  steps:
    - run:
        name: Run LarkCI Tests
        command: npx -y larkci@latest workflows invoke --all --wait

GitLab CI

larkci_tests:
  image: node:lts
  script:
    - npx -y larkci@latest workflows invoke --all --wait
Each provider stores secrets in a different place. Add LARKCI_API_KEY under:
  • GitHub Actions: Settings → Secrets and variables → Actions
  • CircleCI: Project Settings → Environment Variables
  • GitLab CI: Settings → CI/CD → Variables