|
| 1 | +/* |
| 2 | + * Copyright 2023 The Backstage Authors |
| 3 | + * |
| 4 | + * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | + * you may not use this file except in compliance with the License. |
| 6 | + * You may obtain a copy of the License at |
| 7 | + * |
| 8 | + * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | + * |
| 10 | + * Unless required by applicable law or agreed to in writing, software |
| 11 | + * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | + * See the License for the specific language governing permissions and |
| 14 | + * limitations under the License. |
| 15 | + */ |
| 16 | +module.exports = { |
| 17 | + ci: { |
| 18 | + collect: { |
| 19 | + url: [ |
| 20 | + /** Software Catalog */ |
| 21 | + 'http://localhost:3000/catalog', |
| 22 | + 'http://localhost:3000/catalog-import', |
| 23 | + 'http://localhost:3000/catalog/default/component/backstage', |
| 24 | + /** TechDocs */ |
| 25 | + 'http://localhost:3000/docs', |
| 26 | + 'http://localhost:3000/docs/default/component/backstage', |
| 27 | + /** Software Templates */ |
| 28 | + 'http://localhost:3000/create', |
| 29 | + 'http://localhost:3000/create/tasks', |
| 30 | + 'http://localhost:3000/create/actions', |
| 31 | + 'http://localhost:3000/create/edit', |
| 32 | + 'http://localhost:3000/create/templates/default/react-ssr-template', |
| 33 | + /** Search */ |
| 34 | + 'http://localhost:3000/search', |
| 35 | + ], |
| 36 | + settings: { |
| 37 | + onlyCategories: ['accessibility'], |
| 38 | + // need to disable storage reset because of auth |
| 39 | + disableStorageReset: true, |
| 40 | + output: ['html', 'json'], |
| 41 | + outputPath: './.lighthouseci/reports', |
| 42 | + preset: 'desktop', |
| 43 | + }, |
| 44 | + startServerCommand: 'yarn dev', |
| 45 | + startServerReadyTimeout: 600000, |
| 46 | + numberOfRuns: 1, |
| 47 | + puppeteerScript: './.lighthouseci/scripts/guest-auth.js', |
| 48 | + startServerReadyPattern: 'Listening on :7007', |
| 49 | + }, |
| 50 | + assert: { |
| 51 | + assertions: { |
| 52 | + 'categories:performance': 'off', |
| 53 | + 'categories:pwa': 'off', |
| 54 | + 'categories:best-practices': 'off', |
| 55 | + 'categories:seo': 'off', |
| 56 | + 'categories:accessibility': ['error', { minScore: 0.85 }], |
| 57 | + }, |
| 58 | + }, |
| 59 | + }, |
| 60 | +}; |
0 commit comments