Docs · GitHub Action
GitHub Action
Automatically upload your Playwright test results to Exolar from GitHub Actions. Track test history, detect flaky tests, and analyze failures.
Quick Start
1Get your API Key
Go to Settings → API Keys in the dashboard and create a new API key. Copy the key (it starts with exolar_) - you'll need it for the next step.
2Add the secret to GitHub
In your GitHub repository, go to Settings → Secrets and variables → Actions. Create a new secret named EXOLAR_API_KEY with your API key.
3Add to your workflow
Add the action to your Playwright workflow file:
name: Playwright Tests
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install dependencies
run: npm ci
- name: Install Playwright browsers
run: npx playwright install --with-deps
- name: Run Playwright tests
run: npx playwright test
- name: Upload to Exolar
if: always()
uses: Montinou/e2e-test-dashboard-action@v1
with:
api-key: ${{ secrets.EXOLAR_API_KEY }}
results-path: ./test-resultsConfiguration
All Options
- name: Upload to Exolar
if: always()
uses: Montinou/e2e-test-dashboard-action@v1
with:
# Required
api-key: ${{ secrets.EXOLAR_API_KEY }}
# Optional - customize paths
results-path: ./test-results
report-path: ./playwright-report
# Optional - metadata
suite-name: "E2E Tests"
branch: ${{ github.ref_name }}
commit-sha: ${{ github.sha }}
# Optional - artifact upload
upload-artifacts: true
artifact-types: "video,screenshot,trace"Input Reference
api-keyRequiredAPI key from the dashboard
results-pathDefault: ./test-results
Path to Playwright test results
report-pathDefault: ./playwright-report
Path to Playwright HTML report
suite-nameDefault: default
Name for grouping test runs
upload-artifactsDefault: true
Upload videos, screenshots, traces
| Input | Required | Default | Description |
|---|---|---|---|
api-key | Yes | - | API key from the dashboard |
results-path | No | ./test-results | Path to Playwright test results |
report-path | No | ./playwright-report | Path to Playwright HTML report |
suite-name | No | default | Name for grouping test runs |
upload-artifacts | No | true | Upload videos, screenshots, traces |
Playwright Configuration
Make sure your Playwright config outputs test results in JSON format:
// playwright.config.ts
export default defineConfig({
reporter: [
['html'],
['json', { outputFile: 'test-results/results.json' }]
],
use: {
// Capture screenshots and videos on failure
screenshot: 'only-on-failure',
video: 'retain-on-failure',
trace: 'retain-on-failure',
},
});Alternative: Webhook-Based Auto-Analysis
Instead of (or in addition to) the GitHub Action upload step, you can configure Exolar to automatically analyze failures via webhooks. When a CI run fails, Exolar fires aci.run.failed webhook to your endpoint, which can then call POST /api/ci/analyze to classify the failure and optionally open a fix PR.
1Configure a webhook in Settings
Go to Settings → Webhooks and add your endpoint. Subscribe to ci.run.failed. Copy the generated HMAC secret.
// Settings > Webhooks > New Webhook
{
"url": "https://your-server.com/hooks/exolar",
"secret": "your-hmac-secret",
"events": ["ci.run.failed", "ci.run.fixed"]
}2Trigger analysis from a GitHub Actions step
Add a step that calls POST /api/ci/analyze on failure. This returns a classification and, if HEALABLE, opens a draft fix PR automatically.
- name: Trigger Exolar CI Analysis
if: failure()
run: |
curl -X POST https://your-dashboard.com/api/ci/analyze \
-H "Authorization: Bearer ${{ secrets.EXOLAR_API_KEY }}" \
-H "Content-Type: application/json" \
-d '{"run_id":"${{ github.run_id }}"}'When to use webhooks vs the GitHub Action
- • GitHub Action: best for uploading results and artifacts after each run
- • Webhook + /api/ci/analyze: best for automated failure classification and auto-heal PRs
- • Both can be used together for full coverage
See the CI Auto-Analysis docs for full details on classification categories, auto-heal strategies, and guardrails.
Troubleshooting
No test results uploaded
Make sure your Playwright config includes the JSON reporter and the results-path matches your output directory.
Authentication failed
Verify your API key is correct and the secret is properly configured in GitHub.
Action not running on failure
Add if: always() to ensure the action runs even when tests fail.