Run lint and prettier
CI Pipeline / test (20) (pull_request) Successful in 3m0s
CI Pipeline / test (18) (pull_request) Successful in 3m18s
CI Pipeline / e2e (firefox) (pull_request) Successful in 3m20s
CI Pipeline / e2e (chromium) (pull_request) Successful in 3m54s
CI Pipeline / e2e (webkit) (pull_request) Successful in 3m41s
CI Pipeline / performance (pull_request) Successful in 3m3s
CI Pipeline / visual-regression (pull_request) Successful in 7m12s
CI Pipeline / storybook (pull_request) Successful in 1m29s
CI Pipeline / lint (pull_request) Failing after 1m7s
CI Pipeline / build (pull_request) Successful in 1m20s

This commit is contained in:
adilallo
2025-10-07 17:27:07 -06:00
parent c991e22f09
commit 6bd751957c
40 changed files with 96370 additions and 524 deletions
+2 -2
View File
@@ -114,7 +114,7 @@ class BundleAnalyzer {
Object.entries(this.results.bundles).forEach(([filename, bundle]) => {
const budget = budgets.find(
(b) => filename.includes(b.name) || b.name === "all"
(b) => filename.includes(b.name) || b.name === "all",
);
if (budget) {
@@ -175,7 +175,7 @@ class BundleAnalyzer {
// General recommendations
const totalSize = Object.values(this.results.bundles).reduce(
(sum, bundle) => sum + bundle.sizeKB,
0
0,
);
if (totalSize > 2000) {
+6 -6
View File
@@ -69,7 +69,7 @@ class PerformanceMonitor {
});
} catch (error) {
console.warn(
"⚠️ Development server not running, skipping Lighthouse CI..."
"⚠️ Development server not running, skipping Lighthouse CI...",
);
return;
}
@@ -99,23 +99,23 @@ class PerformanceMonitor {
if (resultFile) {
const results = JSON.parse(
fs.readFileSync(path.join(lhciResultsPath, resultFile), "utf8")
fs.readFileSync(path.join(lhciResultsPath, resultFile), "utf8"),
);
if (results.lhr && results.lhr.audits) {
this.metrics.coreWebVitals = {
lcp: this.getAuditScore(
results.lhr.audits,
"largest-contentful-paint"
"largest-contentful-paint",
),
fid: this.getAuditScore(results.lhr.audits, "max-potential-fid"),
cls: this.getAuditScore(
results.lhr.audits,
"cumulative-layout-shift"
"cumulative-layout-shift",
),
fcp: this.getAuditScore(
results.lhr.audits,
"first-contentful-paint"
"first-contentful-paint",
),
tti: this.getAuditScore(results.lhr.audits, "interactive"),
performance: results.lhr.categories.performance?.score * 100 || 0,
@@ -150,7 +150,7 @@ class PerformanceMonitor {
"..",
".next",
"static",
"chunks"
"chunks",
);
if (fs.existsSync(bundleStatsPath)) {
+12 -12
View File
@@ -90,11 +90,11 @@ class PerformanceTester {
"..",
".next",
"analyze",
"bundle-analysis.json"
"bundle-analysis.json",
);
if (fs.existsSync(bundleReportPath)) {
const bundleData = JSON.parse(
fs.readFileSync(bundleReportPath, "utf8")
fs.readFileSync(bundleReportPath, "utf8"),
);
this.results.bundleAnalysis = bundleData;
@@ -105,7 +105,7 @@ class PerformanceTester {
) {
this.results.summary.failed += bundleData.budgetViolations.length;
console.log(
`⚠️ Found ${bundleData.budgetViolations.length} budget violations`
`⚠️ Found ${bundleData.budgetViolations.length} budget violations`,
);
} else {
this.results.summary.passed += 1;
@@ -134,7 +134,7 @@ class PerformanceTester {
"..",
".next",
"monitoring",
"performance-report.json"
"performance-report.json",
);
if (fs.existsSync(perfReportPath)) {
const perfData = JSON.parse(fs.readFileSync(perfReportPath, "utf8"));
@@ -144,7 +144,7 @@ class PerformanceTester {
if (perfData.budgetViolations && perfData.budgetViolations.length > 0) {
this.results.summary.failed += perfData.budgetViolations.length;
console.log(
`⚠️ Found ${perfData.budgetViolations.length} performance violations`
`⚠️ Found ${perfData.budgetViolations.length} performance violations`,
);
} else {
this.results.summary.passed += 1;
@@ -173,11 +173,11 @@ class PerformanceTester {
"..",
".next",
"web-vitals",
"report.json"
"report.json",
);
if (fs.existsSync(vitalsReportPath)) {
const vitalsData = JSON.parse(
fs.readFileSync(vitalsReportPath, "utf8")
fs.readFileSync(vitalsReportPath, "utf8"),
);
this.results.webVitals = vitalsData;
console.log("✅ Web Vitals tracking setup complete");
@@ -204,7 +204,7 @@ class PerformanceTester {
});
} catch (error) {
console.warn(
"⚠️ Development server not running, skipping Lighthouse CI..."
"⚠️ Development server not running, skipping Lighthouse CI...",
);
this.results.summary.warnings += 1;
this.results.summary.total += 1;
@@ -221,7 +221,7 @@ class PerformanceTester {
if (resultFile) {
const lhciData = JSON.parse(
fs.readFileSync(path.join(lhciResultsPath, resultFile), "utf8")
fs.readFileSync(path.join(lhciResultsPath, resultFile), "utf8"),
);
this.results.lighthouse = lhciData;
console.log("✅ Lighthouse CI completed");
@@ -248,7 +248,7 @@ class PerformanceTester {
const reportPath = path.join(
TEST_RESULTS_DIR,
"performance-test-report.json"
"performance-test-report.json",
);
fs.writeFileSync(reportPath, JSON.stringify(this.results, null, 2));
@@ -262,7 +262,7 @@ class PerformanceTester {
generateMarkdownReport() {
const reportPath = path.join(
TEST_RESULTS_DIR,
"performance-test-report.md"
"performance-test-report.md",
);
let report = `# Performance Test Report\n\n`;
@@ -310,7 +310,7 @@ class PerformanceTester {
} (exceeds ${
violation.budget
}) - ${violation.severity.toUpperCase()}\n`;
}
},
);
} else {
report += `✅ No performance budget violations found\n\n`;
+2 -2
View File
@@ -289,7 +289,7 @@ export default WebVitalsDashboard;
if (file.endsWith(".json")) {
const metric = file.replace(".json", "");
const data = JSON.parse(
fs.readFileSync(path.join(WEB_VITALS_DIR, file), "utf8")
fs.readFileSync(path.join(WEB_VITALS_DIR, file), "utf8"),
);
if (data.length > 0) {
@@ -310,7 +310,7 @@ export default WebVitalsDashboard;
max: values.length > 0 ? Math.max(...values) : 0,
goodCount: ratings.filter((r) => r === "good").length,
needsImprovementCount: ratings.filter(
(r) => r === "needs-improvement"
(r) => r === "needs-improvement",
).length,
poorCount: ratings.filter((r) => r === "poor").length,
};