Skip to content

chore(deps): bump @livepeer/design-system to 1.1.2 #244

chore(deps): bump @livepeer/design-system to 1.1.2

chore(deps): bump @livepeer/design-system to 1.1.2 #244

name: Lighthouse (Vercel Preview URL)
on:
pull_request:
branches: [main]
permissions:
contents: read
deployments: read
jobs:
lhci-preview:
runs-on: ubuntu-latest
timeout-minutes: 25
steps:
- name: ⬇️ Checkout
uses: actions/checkout@v4
- name: 🟢 Setup Node
uses: actions/setup-node@v4
with:
node-version: 22
- name: 🔎 Wait for Vercel Deployment + grab Preview URL
id: vercel
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const owner = context.repo.owner;
const repo = context.repo.repo;
const sha = context.payload.pull_request.head.sha;
const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
for (let i = 0; i < 40; i++) {
const { data: deployments } = await github.rest.repos.listDeployments({
owner, repo, sha, per_page: 20,
});
const previewDeployments = deployments.filter(d =>
String(d.environment || "").toLowerCase().includes("preview")
);
const candidates = (previewDeployments.length ? previewDeployments : deployments)
.sort((a, b) => new Date(b.created_at) - new Date(a.created_at));
if (candidates.length) {
const dep = candidates[0];
const { data: statuses } = await github.rest.repos.listDeploymentStatuses({
owner, repo, deployment_id: dep.id, per_page: 20,
});
const success = statuses.find(s => s.state === "success" && s.target_url);
if (success?.target_url) {
core.setOutput("preview_url", success.target_url);
core.info(`Found preview URL: ${success.target_url}`);
return;
}
const failure = statuses.find(s => (s.state === "error" || s.state === "failure"));
if (failure) throw new Error(`Deployment failed: ${failure.description || failure.state}`);
}
core.info(`Waiting for Vercel preview deployment... (${i + 1}/40)`);
await sleep(15000);
}
throw new Error("Timed out waiting for Vercel preview deployment URL.");
- name: 📦 Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10.33.0
run_install: false
- name: 🔎 Run Lighthouse CI against Vercel Preview
env:
PREVIEW_URL: ${{ steps.vercel.outputs.preview_url }}
run: |
echo "Running Lighthouse CI on: $PREVIEW_URL"
pnpm dlx @lhci/cli collect --config=./.lighthouserc.json \
--url="$PREVIEW_URL/" \
--url="$PREVIEW_URL/orchestrators" \
--url="$PREVIEW_URL/leaderboard" \
--url="$PREVIEW_URL/transactions" \
--url="$PREVIEW_URL/voting" \
--url="$PREVIEW_URL/treasury"
pnpm dlx @lhci/cli assert --config=./.lighthouserc.json
pnpm dlx @lhci/cli upload --config=./.lighthouserc.json --target=temporary-public-storage