fix: exhaustive pipeline fixes (404, pagespeed auth, directus health)
Some checks failed
Build & Deploy / 🔍 Prepare Environment (push) Successful in 12s
Build & Deploy / 🧪 QA (push) Successful in 6m41s
Build & Deploy / 🏗️ Build (push) Successful in 7m38s
Build & Deploy / 🚀 Deploy (push) Successful in 14s
Build & Deploy / 🔔 Notifications (push) Successful in 2s
Build & Deploy / ⚡ PageSpeed (push) Failing after 49s
Some checks failed
Build & Deploy / 🔍 Prepare Environment (push) Successful in 12s
Build & Deploy / 🧪 QA (push) Successful in 6m41s
Build & Deploy / 🏗️ Build (push) Successful in 7m38s
Build & Deploy / 🚀 Deploy (push) Successful in 14s
Build & Deploy / 🔔 Notifications (push) Successful in 2s
Build & Deploy / ⚡ PageSpeed (push) Failing after 49s
This commit is contained in:
@@ -13,9 +13,10 @@ import * as path from 'path';
|
||||
*/
|
||||
|
||||
const targetUrl =
|
||||
process.argv[2] || process.env.NEXT_PUBLIC_BASE_URL || 'https://testing.klz-cables.com';
|
||||
const limit = process.env.PAGESPEED_LIMIT ? parseInt(process.env.PAGESPEED_LIMIT) : 20; // Default limit to avoid infinite runs
|
||||
const gatekeeperPassword = process.env.GATEKEEPER_PASSWORD || 'klz2026';
|
||||
process.argv[2] || process.env.NEXT_PUBLIC_BASE_URL || 'https://testing.mintel.me';
|
||||
const limit = process.env.PAGESPEED_LIMIT ? parseInt(process.env.PAGESPEED_LIMIT) : 20;
|
||||
const gatekeeperPassword = process.env.GATEKEEPER_PASSWORD || 'mintel';
|
||||
const gatekeeperCookie = process.env.AUTH_COOKIE_NAME || 'mintel_gatekeeper_session';
|
||||
|
||||
async function main() {
|
||||
console.log(`\n🚀 Starting PageSpeed test for: ${targetUrl}`);
|
||||
@@ -29,7 +30,7 @@ async function main() {
|
||||
// We might need to bypass gatekeeper for the sitemap fetch too
|
||||
const response = await axios.get(sitemapUrl, {
|
||||
headers: {
|
||||
Cookie: `klz_gatekeeper_session=${gatekeeperPassword}`,
|
||||
Cookie: `${gatekeeperCookie}=${gatekeeperPassword}`,
|
||||
},
|
||||
validateStatus: (status) => status < 400,
|
||||
});
|
||||
@@ -73,7 +74,7 @@ async function main() {
|
||||
// Handle authentication for staging/testing
|
||||
// Lighthouse can set cookies via --collect.settings.extraHeaders
|
||||
const extraHeaders = JSON.stringify({
|
||||
Cookie: `klz_gatekeeper_session=${gatekeeperPassword}`,
|
||||
Cookie: `${gatekeeperCookie}=${gatekeeperPassword}`,
|
||||
});
|
||||
|
||||
const chromePath = process.env.CHROME_PATH || process.env.PUPPETEER_EXECUTABLE_PATH;
|
||||
@@ -86,7 +87,7 @@ async function main() {
|
||||
|
||||
// Using a more robust way to execute and capture output
|
||||
// We remove 'npx lhci upload' to keep everything local and avoid Google-hosted reports
|
||||
const lhciCommand = `npx lhci collect ${urlArgs} ${chromePathArg} --collect.settings.chromeFlags='--no-sandbox --disable-setuid-sandbox' --collect.settings.extraHeaders='${extraHeaders}' && npx lhci assert`;
|
||||
const lhciCommand = `npx lhci collect ${urlArgs} ${chromePathArg} --collect.settings.chromeFlags='--no-sandbox --disable-setuid-sandbox --headless' --collect.settings.extraHeaders='${extraHeaders}' && npx lhci assert`;
|
||||
|
||||
console.log(`💻 Executing LHCI...`);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user