Skip to content

Commit

Permalink
ci(lighthouse): fix pour run sur la github action
Browse files Browse the repository at this point in the history
  • Loading branch information
Naorid committed Apr 25, 2023
1 parent 09daba2 commit 8e3766c
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 22 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/lighthouse.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: npm ci && cp .env.test .env
- name: Start dev
run: |
nohup npm run dev </dev/null &>/dev/null &
- name: Sleep for 5 seconds
run: sleep 5s
shell: bash
- name: run Lighthouse CI
run: |
npm install -g @lhci/[email protected]
Expand Down
50 changes: 28 additions & 22 deletions lighthouserc.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
module.exports = {
ci: {
assert: {
assertMatrix: [
{
"matchingUrlPattern": ".*",
"assertions": {
"categories:accessibility": ["error", { "minScore": 1 }],
}
}
assertions: {
// minScore = 1 except for url: https://www.1jeune1solution.gouv.fr/contrat-engagement-jeune
'categories:accessibility': ['error', { minScore: 1 }],
},
},
Expand All @@ -17,27 +23,27 @@ module.exports = {
],
},
url: [
'https://www.1jeune1solution.gouv.fr/',
'https://www.1jeune1solution.gouv.fr/emplois',
'https://www.1jeune1solution.gouv.fr/apprentissage',
'https://www.1jeune1solution.gouv.fr/jobs-etudiants',
'https://www.1jeune1solution.gouv.fr/service-civique',
'https://www.1jeune1solution.gouv.fr/benevolat',
'https://www.1jeune1solution.gouv.fr/stages',
'https://www.1jeune1solution.gouv.fr/stages?offre-de-stage%5Bpage%5D=3',
'https://www.1jeune1solution.gouv.fr/contrat-engagement-jeune',
'https://www.1jeune1solution.gouv.fr/mes-aides',
'https://www.1jeune1solution.gouv.fr/mentorat',
'https://www.1jeune1solution.gouv.fr/creer-mon-cv',
'https://www.1jeune1solution.gouv.fr/espace-jeune',
'https://www.1jeune1solution.gouv.fr/je-deviens-mentor',
'https://www.1jeune1solution.gouv.fr/les-entreprises-s-engagent',
'https://www.1jeune1solution.gouv.fr/immersions',
'https://www.1jeune1solution.gouv.fr/mesures-employeurs',
'https://www.1jeune1solution.gouv.fr/je-recrute-afpr-poei',
'https://www.1jeune1solution.gouv.fr/logements/annonces',
'https://www.1jeune1solution.gouv.fr/logements/aides-logement',
'https://www.1jeune1solution.gouv.fr/formations/apprentissage',
'http://localhost:3000/',
'http://localhost:3000/emplois',
'http://localhost:3000/apprentissage',
'http://localhost:3000/jobs-etudiants',
'http://localhost:3000/service-civique',
'http://localhost:3000/benevolat',
'http://localhost:3000/stages',
'http://localhost:3000/stages?offre-de-stage%5Bpage%5D=3',
'http://localhost:3000/contrat-engagement-jeune',
'http://localhost:3000/mes-aides',
'http://localhost:3000/mentorat',
'http://localhost:3000/creer-mon-cv',
'http://localhost:3000/espace-jeune',
'http://localhost:3000/je-deviens-mentor',
'http://localhost:3000/les-entreprises-s-engagent',
'http://localhost:3000/immersions',
'http://localhost:3000/mesures-employeurs',
'http://localhost:3000/je-recrute-afpr-poei',
'http://localhost:3000/logements/annonces',
'http://localhost:3000/logements/aides-logement',
'http://localhost:3000/formations/apprentissage',
],
},
server: {
Expand Down

0 comments on commit 8e3766c

Please sign in to comment.