fix(ci): optimize pipeline speed and fix link check stability
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 1m7s
Nightly QA / 🔗 Links & Deps (push) Failing after 2m43s
Build & Deploy / 🧪 QA (push) Has been cancelled
Build & Deploy / 🏗️ Build (push) Has been cancelled
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Post-Deploy Verification (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
Nightly QA / 🔍 Static Analysis (push) Has been cancelled
Nightly QA / ♿ Accessibility (push) Has started running
Nightly QA / 🎭 Lighthouse (push) Has started running
Nightly QA / 🔔 Notify (push) Has been cancelled
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 1m7s
Nightly QA / 🔗 Links & Deps (push) Failing after 2m43s
Build & Deploy / 🧪 QA (push) Has been cancelled
Build & Deploy / 🏗️ Build (push) Has been cancelled
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Post-Deploy Verification (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
Nightly QA / 🔍 Static Analysis (push) Has been cancelled
Nightly QA / ♿ Accessibility (push) Has started running
Nightly QA / 🎭 Lighthouse (push) Has started running
Nightly QA / 🔔 Notify (push) Has been cancelled
This commit is contained in:
@@ -56,6 +56,7 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
NEXT_PUBLIC_BASE_URL: ${{ env.TARGET_URL }}
|
NEXT_PUBLIC_BASE_URL: ${{ env.TARGET_URL }}
|
||||||
GATEKEEPER_PASSWORD: ${{ secrets.GATEKEEPER_PASSWORD }}
|
GATEKEEPER_PASSWORD: ${{ secrets.GATEKEEPER_PASSWORD }}
|
||||||
|
ASSET_CHECK_LIMIT: 10
|
||||||
run: pnpm run check:assets
|
run: pnpm run check:assets
|
||||||
- name: 🔒 HTTP Headers
|
- name: 🔒 HTTP Headers
|
||||||
env:
|
env:
|
||||||
@@ -144,11 +145,13 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
NEXT_PUBLIC_BASE_URL: ${{ env.TARGET_URL }}
|
NEXT_PUBLIC_BASE_URL: ${{ env.TARGET_URL }}
|
||||||
GATEKEEPER_PASSWORD: ${{ secrets.GATEKEEPER_PASSWORD }}
|
GATEKEEPER_PASSWORD: ${{ secrets.GATEKEEPER_PASSWORD }}
|
||||||
|
PAGESPEED_LIMIT: 5
|
||||||
run: pnpm run pagespeed:test -- --collect.settings.preset=desktop
|
run: pnpm run pagespeed:test -- --collect.settings.preset=desktop
|
||||||
- name: 📱 Mobile
|
- name: 📱 Mobile
|
||||||
env:
|
env:
|
||||||
NEXT_PUBLIC_BASE_URL: ${{ env.TARGET_URL }}
|
NEXT_PUBLIC_BASE_URL: ${{ env.TARGET_URL }}
|
||||||
GATEKEEPER_PASSWORD: ${{ secrets.GATEKEEPER_PASSWORD }}
|
GATEKEEPER_PASSWORD: ${{ secrets.GATEKEEPER_PASSWORD }}
|
||||||
|
PAGESPEED_LIMIT: 5
|
||||||
run: pnpm run pagespeed:test -- --collect.settings.preset=mobile
|
run: pnpm run pagespeed:test -- --collect.settings.preset=mobile
|
||||||
|
|
||||||
# ────────────────────────────────────────────────────
|
# ────────────────────────────────────────────────────
|
||||||
@@ -188,7 +191,7 @@ jobs:
|
|||||||
- name: 🔗 Lychee Link Check
|
- name: 🔗 Lychee Link Check
|
||||||
uses: lycheeverse/lychee-action@v2
|
uses: lycheeverse/lychee-action@v2
|
||||||
with:
|
with:
|
||||||
args: --accept 200,204,429 --timeout 15 .
|
args: --accept 200,204,429 --timeout 15 --insecure --exclude "file://*" --exclude "https://logs.infra.***.me/*" --exclude "https://git.infra.***.me/*" .
|
||||||
fail: true
|
fail: true
|
||||||
|
|
||||||
# ────────────────────────────────────────────────────
|
# ────────────────────────────────────────────────────
|
||||||
|
|||||||
@@ -1,15 +1,10 @@
|
|||||||
{
|
{
|
||||||
"ci": {
|
"ci": {
|
||||||
"collect": {
|
"collect": {
|
||||||
"numberOfRuns": 3,
|
"numberOfRuns": 1,
|
||||||
"settings": {
|
"settings": {
|
||||||
"preset": "desktop",
|
"preset": "desktop",
|
||||||
"onlyCategories": [
|
"onlyCategories": ["performance", "accessibility", "best-practices", "seo"],
|
||||||
"performance",
|
|
||||||
"accessibility",
|
|
||||||
"best-practices",
|
|
||||||
"seo"
|
|
||||||
],
|
|
||||||
"chromeFlags": "--no-sandbox --disable-setuid-sandbox"
|
"chromeFlags": "--no-sandbox --disable-setuid-sandbox"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -54,4 +49,4 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,10 +6,12 @@ const targetUrl =
|
|||||||
process.argv.find((arg) => !arg.startsWith('--') && arg.startsWith('http')) ||
|
process.argv.find((arg) => !arg.startsWith('--') && arg.startsWith('http')) ||
|
||||||
process.env.NEXT_PUBLIC_BASE_URL ||
|
process.env.NEXT_PUBLIC_BASE_URL ||
|
||||||
'http://localhost:3000';
|
'http://localhost:3000';
|
||||||
|
const limit = process.env.ASSET_CHECK_LIMIT ? parseInt(process.env.ASSET_CHECK_LIMIT) : 20;
|
||||||
const gatekeeperPassword = process.env.GATEKEEPER_PASSWORD || 'klz2026';
|
const gatekeeperPassword = process.env.GATEKEEPER_PASSWORD || 'klz2026';
|
||||||
|
|
||||||
async function main() {
|
async function main() {
|
||||||
console.log(`\n🚀 Starting Strict Asset Integrity Check for: ${targetUrl}`);
|
console.log(`\n🚀 Starting Strict Asset Integrity Check for: ${targetUrl}`);
|
||||||
|
console.log(`📊 Limit: ${limit} pages\n`);
|
||||||
|
|
||||||
// 1. Fetch Sitemap to discover all routes
|
// 1. Fetch Sitemap to discover all routes
|
||||||
const sitemapUrl = `${targetUrl.replace(/\/$/, '')}/sitemap.xml`;
|
const sitemapUrl = `${targetUrl.replace(/\/$/, '')}/sitemap.xml`;
|
||||||
@@ -34,6 +36,17 @@ async function main() {
|
|||||||
.sort();
|
.sort();
|
||||||
|
|
||||||
console.log(`✅ Found ${urls.length} target URLs.`);
|
console.log(`✅ Found ${urls.length} target URLs.`);
|
||||||
|
|
||||||
|
if (urls.length > limit) {
|
||||||
|
console.log(
|
||||||
|
`⚠️ Too many pages (${urls.length}). Limiting to ${limit} representative pages.`,
|
||||||
|
);
|
||||||
|
// Simplify selection: home pages + a slice of the rest
|
||||||
|
const homeEN = urls.filter((u) => u.endsWith('/en') || u === targetUrl);
|
||||||
|
const homeDE = urls.filter((u) => u.endsWith('/de'));
|
||||||
|
const others = urls.filter((u) => !homeEN.includes(u) && !homeDE.includes(u));
|
||||||
|
urls = [...homeEN, ...homeDE, ...others.slice(0, limit - (homeEN.length + homeDE.length))];
|
||||||
|
}
|
||||||
} catch (err: any) {
|
} catch (err: any) {
|
||||||
console.error(`❌ Failed to fetch sitemap: ${err.message}`);
|
console.error(`❌ Failed to fetch sitemap: ${err.message}`);
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
|
|||||||
Reference in New Issue
Block a user