Audit animation performance on every pull request. MotionScore loads your pages in a real browser on the runner, grades them S to F (compositor vs paint vs layout cost, scroll animations, layout thrashing, GPU pressure), and comments the results on the PR.
The grades comment is free for any repository: no token, no account. Adding a MotionScore token and a threshold upgrades it into a gate that fails the build when a page grades below your bar.
Create a workflow file in your repository, for example .github/workflows/motionscore.yml:
name: MotionScore Guard
on: deployment_status
permissions:
pull-requests: write
jobs:
guard:
runs-on: ubuntu-latest
steps:
- uses: motiondivision/motionscore-guard@v1Vercel, Cloudflare Pages and Netlify all emit the deployment_status event with the preview URL; the action reads it from the event, waits for the deploy to succeed, and audits your homepage. Open a pull request and Guard appears in the PR's checks with a grades comment that updates on every push. Add a with: block to audit specific paths:
- uses: motiondivision/motionscore-guard@v1
with:
pages: |
/
/pricingWith a paid MotionScore plan, add your API token as a repository secret named MOTIONSCORE_TOKEN (Settings → Secrets and variables → Actions, or gh secret set MOTIONSCORE_TOKEN) and extend the with: block:
threshold: A
token: ${{ secrets.MOTIONSCORE_TOKEN }}Now the check fails whenever a page grades below threshold. Full step-by-step guide: score.motion.dev/docs/guard.
| Input | Default | Description |
|---|---|---|
url |
auto | Base URL to audit. Defaults to the preview URL on the deployment_status event |
pages |
/ |
Newline-separated paths, relative to url |
threshold |
none | Fail if any page grades worse than this tier (S/A/B/C/D/F). Requires a paid MotionScore plan and token. Empty = report-only comment |
token |
none | MotionScore API token, from your Motion dashboard, stored as the MOTIONSCORE_TOKEN repository secret |
upload |
false |
Upload reports to score.motion.dev (consumes monthly audit slots, adds report links to the comment) |
comment |
true |
Post or update a sticky PR comment |
cli-version |
pinned | motionscore CLI version to run |
grade: worst overall tier across the audited pagespass:"true"when every page met the threshold (or no threshold was set)
The browser runs on your GitHub runner, so audits cost you only runner minutes (roughly 1 to 3 per page; Chrome is cached between runs). Guard runs with --threshold are unmetered and consume none of your monthly audit allowance; only upload: true consumes slots.
The PR comment posts before the gate fires. The job fails with exit 1 when a page grades below threshold, and exit 2 when an audit could not run. If api.motion.dev is unreachable, the run warns and continues rather than failing your build.
