integration_instructionsIntegration Guide

CI/CD Integration

Integrate EdgeGate into your GitHub Actions workflow to automatically test AI model performance on Qualcomm Snapdragon hardware. Set up in 5 minutes.

bolt

Quick Start

Get hardware regression testing running on your PRs in 4 steps.

1
key

Get Your Credentials

  1. Log in to your EdgeGate Dashboard
  2. Open your Workspace → Settings Integrations
  3. Click Generate CI Secret and copy the secret
  4. Note your Workspace ID from the URL or Settings page
2
lock

Add GitHub Secrets

In your repository, go to Settings → Secrets and variables → Actions and add:

SecretDescription
EDGEGATE_WORKSPACE_IDYour workspace UUID
EDGEGATE_API_SECRETThe CI secret you generated
EDGEGATE_PIPELINE_ID(Optional) Pipeline UUID to run
EDGEGATE_MODEL_ARTIFACT_ID(Optional) Model artifact UUID to test
3
description

Create Workflow File

Create a file at .github/workflows/edgegate.yml in your repository and paste the following content:

.github/workflows/edgegate.yml
yaml
name: EdgeGate AI Test

on:
  pull_request:
    branches: [main]
  push:
    branches: [main]

permissions:
  contents: read
  pull-requests: write
  issues: write
  checks: write

jobs:
  edgegate-test:
    name: EdgeGate AI Performance Test
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v4

      - name: Run EdgeGate Test
        uses: actions/github-script@v7
        env:
          WORKSPACE_ID: ${{ secrets.EDGEGATE_WORKSPACE_ID }}
          API_SECRET: ${{ secrets.EDGEGATE_API_SECRET }}
          PIPELINE_ID: ${{ secrets.EDGEGATE_PIPELINE_ID }}
          MODEL_ARTIFACT_ID: ${{ secrets.EDGEGATE_MODEL_ARTIFACT_ID }}
          EDGEGATE_API_URL: https://edgegateapi.frozo.ai
        with:
          script: |
            const crypto = require('crypto');

            const timestamp = new Date().toISOString();
            const nonce = crypto.randomUUID();
            const body = JSON.stringify({
              pipeline_id: process.env.PIPELINE_ID,
              model_artifact_id: process.env.MODEL_ARTIFACT_ID,
              commit_sha: context.sha,
              branch: context.ref,
              pull_request: context.payload.pull_request?.number
            });

            const message = timestamp + '\n' + nonce + '\n' + body;
            const signature = crypto
              .createHmac('sha256', process.env.API_SECRET)
              .update(message)
              .digest('hex');

            const response = await fetch(
              process.env.EDGEGATE_API_URL + '/v1/ci/github/run',
              {
                method: 'POST',
                headers: {
                  'Content-Type': 'application/json',
                  'X-EdgeGate-Workspace': process.env.WORKSPACE_ID,
                  'X-EdgeGate-Timestamp': timestamp,
                  'X-EdgeGate-Nonce': nonce,
                  'X-EdgeGate-Signature': signature,
                },
                body: body,
              }
            );

            const result = await response.json();
            console.log('EdgeGate response:', JSON.stringify(result, null, 2));

            if (!response.ok) {
              core.setFailed('EdgeGate test failed: ' + result.detail);
            } else {
              core.info('Run queued: ' + result.run_id);
            }

Note: For the full production-ready script, please refer to our Integration Guide.

4
merge

Create a PR

The workflow runs automatically on every PR to main. You'll see:

  • Authentication verification
  • bar_chart Performance test results (inference time, peak memory)
  • verified Pass/fail gate status on your PR check
rocket_launch

Full Integration

For complete on-device AI performance testing on every PR.

1
route

Create a Pipeline

  1. Go to Pipelines → Create Pipeline
  2. Select target devices (e.g., Snapdragon 8 Gen 3, Snapdragon 7s Gen 2)
  3. Define quality gates:
Example gates
yaml
gates:
  - metric: inference_time_ms
    operator: lte
    threshold: 1.0       # Inference ≤ 1.0ms
  - metric: peak_memory_mb
    operator: lte
    threshold: 150.0     # Peak memory ≤ 150MB

Copy the Pipeline ID from the pipeline detail page.

2
upload_file

Upload Your Model

  1. Go to Artifacts → Upload Model
  2. Upload your ONNX, TorchScript, or TFLite model
  3. Copy the Model Artifact ID
3
vpn_key

Add Pipeline Secrets

Add these additional secrets to your GitHub repository:

SecretValue
EDGEGATE_PIPELINE_IDPipeline UUID from step 1
EDGEGATE_MODEL_ARTIFACT_IDModel Artifact UUID from step 2

Now every PR will trigger full on-device AI regression tests automatically.

api

API Reference

All CI requests use HMAC-SHA256 authentication for security.

Authentication Headers

HeaderDescription
X-EdgeGate-WorkspaceWorkspace UUID
X-EdgeGate-TimestampISO 8601 timestamp (e.g. 2026-01-11T12:00:00Z)
X-EdgeGate-NonceUnique request ID (UUID v4)
X-EdgeGate-SignatureHMAC-SHA256 signature

Signature Computation

The signature is an HMAC-SHA256 digest of the message string using your CI secret as the key:

signature.sh
bash
# Message format: timestamp + newline + nonce + newline + body
# For POST requests (with body):
MESSAGE=$(printf '%s\n%s\n%s' "$TIMESTAMP" "$NONCE" "$BODY")
SIGNATURE=$(printf '%s' "$MESSAGE" | openssl dgst -sha256 -hmac "$SECRET" | awk '{print $2}')

# For GET requests (no body):
MESSAGE=$(printf '%s\n%s\n' "$TIMESTAMP" "$NONCE")
SIGNATURE=$(printf '%s' "$MESSAGE" | openssl dgst -sha256 -hmac "$SECRET" | awk '{print $2}')

Endpoints

GET/v1/ci/status

Test CI authentication. Returns 200 if your credentials are valid.

Response (200)

{
  "status": "ok",
  "workspace_id": "uuid",
  "message": "CI authentication successful"
}
POST/v1/ci/github/run

Trigger a performance test run on real Snapdragon hardware.

Request Body

{
  "pipeline_id": "uuid",
  "model_artifact_id": "uuid",
  "commit_sha": "abc123",
  "branch": "feature/new-model",
  "pull_request": 42
}

Response (202)

{
  "run_id": "uuid",
  "status": "queued",
  "pipeline_id": "uuid",
  "message": "Run queued successfully"
}
GET/v1/ci/runs/{run_id}

Poll the status of a run. Use this after triggering a run to wait for completion and check pass/fail results.

Response (200)

{
  "run_id": "uuid",
  "status": "passed",
  "pipeline_id": "uuid",
  "gates_passed": 2,
  "gates_total": 2,
  "metrics": {
    "inference_time_ms": 0.176,
    "peak_memory_mb": 121.51
  },
  "error": null,
  "completed_at": "2026-02-25T12:00:00Z"
}

Possible status values: queued running passed failed error

build

Troubleshooting

error"Invalid signature" error

  1. Verify EDGEGATE_API_SECRET is correctly set (43 characters)
  2. Check timestamp is current (±5 minutes tolerance)
  3. Ensure message format: timestamp\nnonce\nbody

error"Nonce already used" error

Each nonce can only be used once. The workflow generates unique UUIDs automatically. If you're testing manually, generate a new UUID for each request.

errorPipeline/Model not found

Verify the UUIDs are correct and belong to your workspace. Check the pipeline and artifact pages in the dashboard to confirm.

Ready to get started?

Create your free account and add hardware regression testing to your CI/CD pipeline in minutes.