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.
Quick Start
Get hardware regression testing running on your PRs in 4 steps.
Get Your Credentials
- Log in to your EdgeGate Dashboard
- Open your Workspace → Settings → Integrations
- Click Generate CI Secret and copy the secret
- Note your Workspace ID from the URL or Settings page
Add GitHub Secrets
In your repository, go to Settings → Secrets and variables → Actions and add:
| Secret | Description |
|---|---|
| EDGEGATE_WORKSPACE_ID | Your workspace UUID |
| EDGEGATE_API_SECRET | The CI secret you generated |
| EDGEGATE_PIPELINE_ID | (Optional) Pipeline UUID to run |
| EDGEGATE_MODEL_ARTIFACT_ID | (Optional) Model artifact UUID to test |
Create Workflow File
Create a file at .github/workflows/edgegate.yml in your repository and paste the following content:
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.
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
Full Integration
For complete on-device AI performance testing on every PR.
Create a Pipeline
- Go to Pipelines → Create Pipeline
- Select target devices (e.g., Snapdragon 8 Gen 3, Snapdragon 7s Gen 2)
- Define quality gates:
gates:
- metric: inference_time_ms
operator: lte
threshold: 1.0 # Inference ≤ 1.0ms
- metric: peak_memory_mb
operator: lte
threshold: 150.0 # Peak memory ≤ 150MBCopy the Pipeline ID from the pipeline detail page.
Upload Your Model
- Go to Artifacts → Upload Model
- Upload your ONNX, TorchScript, or TFLite model
- Copy the Model Artifact ID
Add Pipeline Secrets
Add these additional secrets to your GitHub repository:
| Secret | Value |
|---|---|
| EDGEGATE_PIPELINE_ID | Pipeline UUID from step 1 |
| EDGEGATE_MODEL_ARTIFACT_ID | Model Artifact UUID from step 2 |
Now every PR will trigger full on-device AI regression tests automatically.
API Reference
All CI requests use HMAC-SHA256 authentication for security.
Authentication Headers
| Header | Description |
|---|---|
| X-EdgeGate-Workspace | Workspace UUID |
| X-EdgeGate-Timestamp | ISO 8601 timestamp (e.g. 2026-01-11T12:00:00Z) |
| X-EdgeGate-Nonce | Unique request ID (UUID v4) |
| X-EdgeGate-Signature | HMAC-SHA256 signature |
Signature Computation
The signature is an HMAC-SHA256 digest of the message string using your CI secret as the key:
# 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
/v1/ci/statusTest CI authentication. Returns 200 if your credentials are valid.
Response (200)
{
"status": "ok",
"workspace_id": "uuid",
"message": "CI authentication successful"
}/v1/ci/github/runTrigger 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"
}/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
Troubleshooting
error"Invalid signature" error
- Verify
EDGEGATE_API_SECRETis correctly set (43 characters) - Check timestamp is current (±5 minutes tolerance)
- 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.