Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

223
Views
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 answers
Answer question

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 Report

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!