CI/CD Integration
Add LaunchGate eval gating to your continuous integration pipeline so quality checks run automatically on every change.
GitHub Actions (recommended)
The simplest integration uses the official GitHub Action.
Add your API key as a secret
Go to your repository Settings → Secrets and variables → Actions and add LAUNCHGATE_API_KEY.
Create the workflow
.github/workflows/eval.yml
name: LaunchGate Eval
on:
pull_request:
branches: [main]
permissions:
pull-requests: write
jobs:
eval:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "22"
- name: Install dependencies
run: npm ci
- name: Generate AI output
id: generate
run: |
OUTPUT=$(node scripts/generate.js)
echo "text=$OUTPUT" >> $GITHUB_OUTPUT
- name: Run LaunchGate Eval
uses: launchgate/eval-action@v1
with:
api-key: ${{ secrets.LAUNCHGATE_API_KEY }}
suite: "rag-faithfulness"
output: ${{ steps.generate.outputs.text }}
input: '{"context": "...", "query": "..."}'The action will:
- Run the eval suite against your output
- Post a formatted results comment on the PR
- Fail the workflow if the eval is “aborted”
Using the CLI
For CI systems without a dedicated action, use the CLI:
GitHub Actions
.github/workflows/eval.yml
- name: Install LaunchGate CLI
run: npm install -g @launchgate/cli
- name: Run eval
env:
LAUNCHGATE_API_KEY: ${{ secrets.LAUNCHGATE_API_KEY }}
run: |
launchgate run rag-faithfulness \
--output "${{ steps.generate.outputs.text }}" \
--input '{"context": "..."}'Multiple suites
Run multiple eval suites in parallel:
.github/workflows/eval.yml
jobs:
eval:
runs-on: ubuntu-latest
strategy:
matrix:
suite: [rag-faithfulness, content-safety, format-compliance]
steps:
- name: Run eval
uses: launchgate/eval-action@v1
with:
api-key: ${{ secrets.LAUNCHGATE_API_KEY }}
suite: ${{ matrix.suite }}
output: ${{ needs.generate.outputs.text }}Non-blocking mode
If you want eval results without blocking the pipeline:
- name: Run eval (non-blocking)
uses: launchgate/eval-action@v1
with:
api-key: ${{ secrets.LAUNCHGATE_API_KEY }}
suite: "my-suite"
output: "..."
fail-on-abort: "false"Non-blocking mode still posts a PR comment with results — it just doesn’t fail the workflow step. This is useful during initial rollout when you want to observe eval results before enforcing them.
Last updated on