我将 lighthouse ci 设置为在 Github 操作中运行,但我的应用程序是用 Gatsby 制作的,不打算成为 PWA,当我运行 lhci autorun
时它一直要求我包括 list 和一堆与 PWA 相关的东西。我希望灯塔检查的唯一方面是可访问性。
这是我实际的 github 操作:
lighthouseci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- run: yarn && sudo yarn global add @lhci/cli@0.6.x
- run: yarn build
- run: lhci autorun
最佳答案
我刚刚开始工作,正如格雷厄姆在一次回复中所说,我们可以禁用我们想要的任何类别。
{
"ci": {
"assert": {
"assertions": {
"categories:performance": "off",
"categories:pwa": "off",
"categories:accessibility": ["error", { "minScore": 1 }]
}
}
}
}
关于javascript - 如何将 Lighthouse CI 设置为仅测试可访问性?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65550806/