Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

217
Visualizações
How can I set Lighthouse CI to only test accessibility?

I'm setting lighthouse ci to run in a Github action but my app is made with Gatsby and is not intended to be a PWA and when I run lhci autorun it keeps asking me to include manifest and a bunch of things related to a PWA. The only aspect I want lighthouse to check is accessibility.

This is my actual github action:

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
over 4 years ago · Santiago Trujillo
2 Respostas
Responde à pergunta

0

I've just get it working, As Graham said on one reply we can disable any category we want.

{
  "ci": {
    "assert": {
      "assertions": {
        "categories:performance": "off",
        "categories:pwa": "off",
        "categories:accessibility": ["error", { "minScore": 1 }]
      }
    }
  }
}

over 4 years ago · Santiago Trujillo Relatório

0

You are looking for --only-categories as one of the flags you set.

Set the flag to only run accessibility as follows if using the command line:

lighthouse https://example.com --only-categories=accessibility

Using Github Actions

I personally don't use Github actions but from what I understand you will have to include a config file in order to run specific tests.

{
  "config": {
    "settings": {
      "onlyCategories": ["accessibility"]
    }
  }
}

Edit to include lighthouse-ci config

From what I can gather if you are using lighthouse-ci then you need to add a config file "lighthouserc.js" to the working directory with the following format:

module.exports = {
  ci: {
    collect: {
      settings: {
         //set which categories you want to run here.
         onlyCategories: ['accessibility']
      }
    },
    assert: {
      // assert options here
    },
    upload: {
      // upload options here
    },
    server: {
      // server options here
    },
    wizard: {
      // wizard options here
    },
  },
};
over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda