Skip to content

chore: fix robots tests #728

chore: fix robots tests

chore: fix robots tests #728

Triggered via push September 29, 2024 06:26
Status Failure
Total duration 1m 34s
Artifacts

test.yml

on: push
Matrix: build
Fit to window
Zoom out
Zoom in

Annotations

5 errors
test/ci.test.ts > ci > tests harlanzw.com: test/ci.test.ts#L45
Error: Command failed with exit code 1: node /home/runner/work/unlighthouse/unlighthouse/packages/unlighthouse/bin/unlighthouse-ci.cjs --root /home/runner/work/unlighthouse/unlighthouse/test/.cache/1727591234018 --debug --site harlanzw.com [warn] [Unlighthouse] Dynamic sampling is in effect, some of your routes will not be scanned. To disable this behavior, set `scanner.dynamicSampling` to `false`. [error] [Unlighthouse] /opensearch.xml has invalid score `0.43` for category `accessibility`. [debug] [Unlighthouse] Starting Unlighthouse at root: `/home/runner/work/unlighthouse/unlighthouse/test/.cache/1727591234018` cwd: /home/runner/work/unlighthouse/unlighthouse/test/.cache/1727591234018 [debug] [Unlighthouse] Discovered config definition { config: { site: 'https://harlanzw.com', cache: false, scanner: { device: 'desktop', throttle: false }, ci: { budget: [Object] }, lighthouseOptions: { onlyCategories: [Array] }, debug: true }, sources: [ '/home/runner/work/unlighthouse/unlighthouse/test/.cache/1727591234018/unlighthouse.config.ts' ], dependencies: [ 'file:///home/runner/work/unlighthouse/unlighthouse/test/.cache/1727591234018/unlighthouse.config.ts' ] } [debug] [Unlighthouse] Unable to locale page files, disabling route discovery. [info] [Unlighthouse] Using system chrome located at: `/usr/bin/google-chrome-stable`. [debug] [Unlighthouse] Post config resolution { routerPrefix: '/', apiPrefix: '/api', cache: false, client: { groupRoutesKey: 'route.definition.name', columns: { overview: [Array], accessibility: [Array], 'best-practices': [Array], seo: [Array] } }, scanner: { customSampling: {}, ignoreI18nPages: true, maxRoutes: 200, skipJavascript: true, samples: 1, throttle: false, crawler: true, dynamicSampling: 8, sitemap: true, robotsTxt: true, device: 'desktop', exclude: [ '/cdn-cgi/*' ] }, server: { port: 5678, showURL: false, open: true }, discovery: false, root: '/home/runner/work/unlighthouse/unlighthouse/test/.cache/1727591234018', outputPath: '/home/runner/work/unlighthouse/unlighthouse/test/.cache/1727591234018/.unlighthouse', debug: true, puppeteerOptions: { headless: true, ignoreHTTPSErrors: true, timeout: 0, protocolTimeout: 0, defaultViewport: { mobile: false, width: 1350, height: 940, deviceScaleFactor: 1, disabled: false }, executablePath: '/usr/bin/google-chrome-stable' }, puppeteerClusterOptions: { timeout: 300000, monitor: true, workerCreationDelay: 500, retryLimit: 3, maxConcurrency: 3, skipDuplicateUrls: false, retryDelay: 2000, concurrency: 3, puppeteer: PuppeteerNode { _isPuppeteerCore: true, _changedBrowsers: false, connect: [Function: bound bound connect], defaultBrowserRevision: '129.0.6668.58', configuration: [Object], launch: [Function: bound launch], executablePath: [Function: bound executablePath], defaultArgs: [Function: bound defaultArgs], trimCache: [Function: bound trimCache] AsyncFunction } }, lighthouseOptions: { onlyCategories: [ 'accessibility', 'best-practices', 'seo' ], throttlingMethod: 'simulate', throttling: { rttMs: 150, throughputKbps: 1638.4, requestLatencyMs: 600, downloadThroughputKbps: 1638.4, uploadThroughputKbps: 750, cpuSlowdownMultiplier: 1 }, formFactor: 'desktop', screenEmulation: { mobile: false, width: 1350, height: 940, deviceScaleFactor: 1, disabled: false }, emulatedUserAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36' }, urls: [], site: 'https://harlanzw.com', ci: { budget: { 'best-practices': 50, seo: 50, accessibility: 50 }, buildStatic: false, reporter: 'jsonSimple', reporterConfig: { lhciHost: undefined, lhciBuildToken: undefined, lhciAuth: undefined } }, hooks: { 'resolved-config': [
test/ci.test.ts > ci > tests harlanzw.com and generate json expanded: test/ci.test.ts#L45
Error: Command failed with exit code 1: node /home/runner/work/unlighthouse/unlighthouse/packages/unlighthouse/bin/unlighthouse-ci.cjs --root /home/runner/work/unlighthouse/unlighthouse/test/.cache/1727591246996 --debug --site harlanzw.com [warn] [Unlighthouse] Dynamic sampling is in effect, some of your routes will not be scanned. To disable this behavior, set `scanner.dynamicSampling` to `false`. [error] [Unlighthouse] /opensearch.xml has invalid score `0.43` for category `accessibility`. [debug] [Unlighthouse] Starting Unlighthouse at root: `/home/runner/work/unlighthouse/unlighthouse/test/.cache/1727591246996` cwd: /home/runner/work/unlighthouse/unlighthouse/test/.cache/1727591246996 [debug] [Unlighthouse] Discovered config definition { config: { site: 'https://harlanzw.com', cache: false, scanner: { device: 'desktop', throttle: false }, ci: { budget: [Object], reporter: 'jsonExpanded' }, debug: true }, sources: [ '/home/runner/work/unlighthouse/unlighthouse/test/.cache/1727591246996/unlighthouse.config.ts' ], dependencies: [ 'file:///home/runner/work/unlighthouse/unlighthouse/test/.cache/1727591246996/unlighthouse.config.ts' ] } [debug] [Unlighthouse] Unable to locale page files, disabling route discovery. [info] [Unlighthouse] Using system chrome located at: `/usr/bin/google-chrome-stable`. [debug] [Unlighthouse] Post config resolution { routerPrefix: '/', apiPrefix: '/api', cache: false, client: { groupRoutesKey: 'route.definition.name', columns: { overview: [Array], performance: [Array], accessibility: [Array], 'best-practices': [Array], seo: [Array] } }, scanner: { customSampling: {}, ignoreI18nPages: true, maxRoutes: 200, skipJavascript: true, samples: 1, throttle: false, crawler: true, dynamicSampling: 8, sitemap: true, robotsTxt: true, device: 'desktop', exclude: [ '/cdn-cgi/*' ] }, server: { port: 5678, showURL: false, open: true }, discovery: false, root: '/home/runner/work/unlighthouse/unlighthouse/test/.cache/1727591246996', outputPath: '/home/runner/work/unlighthouse/unlighthouse/test/.cache/1727591246996/.unlighthouse', debug: true, puppeteerOptions: { headless: true, ignoreHTTPSErrors: true, timeout: 0, protocolTimeout: 0, defaultViewport: { mobile: false, width: 1350, height: 940, deviceScaleFactor: 1, disabled: false }, executablePath: '/usr/bin/google-chrome-stable' }, puppeteerClusterOptions: { timeout: 300000, monitor: true, workerCreationDelay: 500, retryLimit: 3, maxConcurrency: 3, skipDuplicateUrls: false, retryDelay: 2000, concurrency: 3, puppeteer: PuppeteerNode { _isPuppeteerCore: true, _changedBrowsers: false, connect: [Function: bound bound connect], defaultBrowserRevision: '129.0.6668.58', configuration: [Object], launch: [Function: bound launch], executablePath: [Function: bound executablePath], defaultArgs: [Function: bound defaultArgs], trimCache: [Function: bound trimCache] AsyncFunction } }, lighthouseOptions: { onlyCategories: [ 'performance', 'accessibility', 'best-practices', 'seo' ], throttlingMethod: 'simulate', throttling: { rttMs: 150, throughputKbps: 1638.4, requestLatencyMs: 600, downloadThroughputKbps: 1638.4, uploadThroughputKbps: 750, cpuSlowdownMultiplier: 1 }, formFactor: 'desktop', screenEmulation: { mobile: false, width: 1350, height: 940, deviceScaleFactor: 1, disabled: false }, emulatedUserAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36' }, urls: [], site: 'https://harlanzw.com', ci: { budget: { 'best-practices': 50, seo: 50, accessibility: 50 }, buildStatic: false, reporter: 'jsonExpanded', reporterConfig: { lhciHost: undefined, lhciBuildToken: undefined, lhciAuth: un
packages/core/test/robots.test.ts > robots > parses example #2: packages/core/test/robots.test.ts#L105
Error: Snapshot `robots > parses example #2 2` mismatched - Expected + Received { "scanner": { "_robotsTxtRules": [ - [ - { - "allow": false, + { + "allow": false, - "pattern": "/account/", + "pattern": "/account/", - }, + }, - { + { - "allow": false, + "allow": false, - "pattern": "/dashboard/", + "pattern": "/dashboard/", - }, + }, - { - "allow": false, + { + "allow": false, - "pattern": "/admin/", + "pattern": "/admin/", - }, + }, - { - "allow": false, + { + "allow": false, - "pattern": "/mod/", + "pattern": "/mod/", - }, + }, - { + { - "allow": true, + "allow": true, - "pattern": "/$", + "pattern": "/$", - }, + }, - { + { - "allow": true, + "allow": true, - "pattern": "/wiki/", + "pattern": "/wiki/", - }, - ], + }, ], "exclude": [], "sitemap": [], }, } ❯ packages/core/test/robots.test.ts:105:28
packages/core/test/robots.test.ts > robots > parsed example #3: packages/core/test/robots.test.ts#L329
Error: Snapshot `robots > parsed example #3 2` mismatched - Expected + Received @@ -1,102 +1,100 @@ { "scanner": { "_robotsTxtRules": [ - [ - { - "allow": false, + { + "allow": false, - "pattern": "/CVS", + "pattern": "/CVS", - }, + }, - { + { - "allow": false, + "allow": false, - "pattern": "/*.svn$", + "pattern": "/*.svn$", - }, + }, - { + { - "allow": false, + "allow": false, - "pattern": "/*.idea$", + "pattern": "/*.idea$", - }, + }, - { + { - "allow": false, + "allow": false, - "pattern": "/*.sql$", + "pattern": "/*.sql$", - }, + }, - { + { - "allow": false, + "allow": false, - "pattern": "/*.tgz$", + "pattern": "/*.tgz$", - }, + }, - { + { - "allow": false, + "allow": false, - "pattern": "*brand=*", + "pattern": "*brand=*", - }, + }, - { + { - "allow": false, + "allow": false, - "pattern": "*color=*", + "pattern": "*color=*", - }, + }, - { + { - "allow": false, + "allow": false, - "pattern": "*color_filter=*", + "pattern": "*color_filter=*", - }, + }, - { + { - "allow": false, + "allow": false, - "pattern": "*material_filter=*", + "pattern": "*material_filter=*", - }, + }, - { + { - "allow": false, + "allow": false, - "pattern": "*fitting_filter=*", + "pattern": "*fitting_filter=*", - }, + }, - { + { - "allow": false, + "allow": false, - "pattern": "*asc=price*", + "pattern": "*asc=price*", - }, + }, - { + { - "allow": false, + "allow": false, - "pattern": "*desc=price*", + "pattern": "*desc=price*", - }, + }, - { + { - "allow": false, + "allow": false, - "pattern": "*asc=name*", + "pattern": "*asc=name*", - }, + }, - { + { - "allow": false, + "allow": false, - "pattern": "*desc=name*", + "pattern": "*desc=name*", - }, + }, - { + { - "allow": false, + "allow": false, - "pattern": "*food_type=*", + "pattern": "*food_type=*", - }, + }, - { + { - "allow": false, + "allow": false, - "pattern": "*tags=*", + "pattern": "*tags=*", - }, + }, - { - "allow": false, + { + "allow": false, - "pattern": "*size=*", + "pattern": "*size=*", - }, + }, - { + { - "allow": false, + "allow": false, - "pattern": "*search=*", + "pattern": "*search=*", - }, + }, - { - "allow": false, + { + "allow": false, - "pattern": "*popup=*", + "pattern": "*popup=*", - }, + }, - { + { - "allow": false, + "allow": false, - "pattern": "*successRedirect=*", + "pattern": "*successRedirect=*", - }, + }, - { + { - "allow": false, + "allow": false, - "pattern": "*/user/*", + "pattern": "*/user/*", - }, + }, - { - "allow": false, + { + "allow": false, - "pattern": "*/checkout/*", + "pattern": "*/checkout/*", - }, + }, - { + { - "allow": false, + "allow": false, - "pattern": "*/wishlist/*", + "pattern": "*/wishl
build (18.x, ubuntu-latest)
Process completed with exit code 1.