FeaturesCI/CDGitHub Actions

GitHub Actions Integration

Run BugBrain tests automatically on every push and pull request.

Setup

1. Generate CI/CD Token

  1. Go to Settings → CI/CD
  2. Click “Generate Token”
  3. Copy Webhook URL and Secret

2. Add GitHub Secrets

In your GitHub repo:

  1. Go to Settings → Secrets and variables → Actions
  2. Create 2 new secrets:
    BUGBRAIN_WEBHOOK_URL=https://your-domain.com/api/webhooks/...
    BUGBRAIN_WEBHOOK_SECRET=your_secret_here
  3. (Optional) Create BUGBRAIN_TEST_PLAN_ID if you want to run a specific test plan

3. Create Workflow File

Create .github/workflows/bugbrain-tests.yml:

name: BugBrain Tests
on:
  push:
    branches: [main, develop]
  pull_request:
    branches: [main]
 
jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - name: Trigger BugBrain Tests
        run: |
          curl -X POST \
            -H "Content-Type: application/json" \
            -H "X-Gitlab-Token: ${{ secrets.BUGBRAIN_WEBHOOK_SECRET }}" \
            -d '{
              "ref": "${{ github.ref }}",
              "commit": "${{ github.sha }}",
              "repository": "${{ github.repository }}",
              "testPlanId": "${{ vars.BUGBRAIN_TEST_PLAN_ID }}"
            }' \
            ${{ secrets.BUGBRAIN_WEBHOOK_URL }}

4. Test It

  1. Push a commit to main
  2. Watch tests trigger in BugBrain
  3. Results appear in GitHub Actions

Adding Status Badge

Add to your README.md:

[![BugBrain Tests](YOUR_BADGE_URL_FROM_SETTINGS)](https://bugbrain.tech)

Configuration

Run on Specific Branches

on:
  push:
    branches: [main, staging]  # Only these branches

Run on Pull Requests

on:
  pull_request:
    branches: [main]  # Only PR to main

Run on Schedule

on:
  schedule:
    - cron: '0 9 * * *'  # Daily at 9 AM UTC

Next Steps

Setup Guide | GitLab CI | Jenkins