| name | miro-ci-integration |
| description | Configure CI/CD pipelines for Miro REST API v2 integrations with GitHub Actions,
test board isolation, and automated validation.
Trigger with phrases like "miro CI", "miro GitHub Actions",
"miro automated tests", "CI miro", "miro pipeline".
|
| allowed-tools | Read, Write, Edit, Bash(gh:*) |
| version | 1.6.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| tags | ["saas","miro","ci-cd","github-actions"] |
| compatibility | Designed for Claude Code |
Miro CI Integration
Overview
Set up CI/CD pipelines for Miro REST API v2 integrations with isolated test boards, proper secret handling, and API validation in GitHub Actions.
Prerequisites
- GitHub repository with Actions enabled
- Miro app with test credentials (separate from production)
- A dedicated test board ID for integration tests
GitHub Actions Workflow
name: Miro Integration Tests
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
unit-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- run: npm ci
- run: npm test -- --coverage
- name: Upload coverage
if: always()
uses: actions/upload-artifact@v4
with:
name: coverage
path: coverage/
integration-tests:
runs-on: ubuntu-latest
needs:
Configuring Secrets
gh secret set MIRO_ACCESS_TOKEN_TEST --body "your_test_access_token"
gh secret set MIRO_TEST_BOARD_ID --body "uXjVN1234567890"
gh secret set MIRO_CLIENT_ID --body "your_client_id"
gh secret set MIRO_CLIENT_SECRET --body "your_client_secret"
gh secret set MIRO_REFRESH_TOKEN --body "your_refresh_token"
Integration Test Examples
import { describe, it, expect, afterAll } from 'vitest';
const TOKEN = process.env.MIRO_ACCESS_TOKEN!;
const BOARD_ID = process.env.MIRO_TEST_BOARD_ID!;
const BASE = 'https://api.miro.com/v2';
const createdIds: string[] = [];
const miroFetch = async (path: string, method = 'GET', body?: unknown) => {
const response = await fetch(`${BASE}${path}`, {
method,
headers: {
'Authorization': `Bearer ${TOKEN}`,
'Content-Type': 'application/json',
},
...(body ? { body: JSON.stringify(body) } : {}),
});
return { status: response.status, data: await response.json() };
};
describe('Miro REST API v2 Integration', () => {
it.(!)(, () => {
{ status, data } = ();
(status).();
(data.).();
(data.).();
});
it.(!)(, () => {
{ : createStatus, : note } = (
, ,
{
: { : , : },
: { : },
: { : , : },
}
);
(createStatus).();
(note.).();
createdIds.(note.);
{ : deleteStatus } = (
,
);
(deleteStatus).();
});
it.(!)(, () => {
{ status, data } = (
);
(status).();
(.(data.)).();
});
( () => {
( id createdIds) {
(, ).( {});
}
});
});
Token Refresh in CI
Miro access tokens expire in ~1 hour. For CI pipelines that run infrequently, automate refresh:
refresh-token:
runs-on: ubuntu-latest
steps:
- name: Refresh Miro access token
run: |
RESPONSE=$(curl -s -X POST https://api.miro.com/v1/oauth/token \
-d "grant_type=refresh_token" \
-d "client_id=${{ secrets.MIRO_CLIENT_ID }}" \
-d "client_secret=${{ secrets.MIRO_CLIENT_SECRET }}" \
-d "refresh_token=${{ secrets.MIRO_REFRESH_TOKEN }}")
NEW_TOKEN=$(echo "$RESPONSE" | jq -r '.access_token')
if [ "$NEW_TOKEN" = "null" ] || [ -z "$NEW_TOKEN" ]; then
echo "::error::Token refresh failed"
exit 1
fi
echo "::add-mask::$NEW_TOKEN"
echo "MIRO_ACCESS_TOKEN=$NEW_TOKEN" >> "$GITHUB_ENV"
Error Handling
| CI Issue | Cause | Solution |
|---|
| Token expired in CI | Long time between runs | Add token refresh step |
| Rate limited in CI | Parallel test runs | Run integration tests serially |
| Test board full | No cleanup | Add afterAll cleanup step |
| Flaky tests | Miro API latency | Add retries + increase timeout |
| Secret not found | Missing GitHub secret | Run gh secret set commands above |
Resources
Next Steps
For deployment patterns, see miro-deploy-integration.