Skip to content

Commit

Permalink
tech: ajout lighthouse ci
Browse files Browse the repository at this point in the history
  • Loading branch information
OCTO-GUIC committed Feb 12, 2024
1 parent 8928ccd commit 9880408
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/lighthouse.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Lighthouse CI

on: [push]

jobs:
lhci:
name: Lighthouse
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js 18
uses: actions/setup-node@v3
with:
node-version: 18
- name: yarn install, build
run: |
yarn install
yarn run build
- name: run Lighthouse CI
run: |
yarn global add @lhci/[email protected]
lhci autorun
1 change: 1 addition & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
pull_request:
branches:
- main
workflow_dispatch:

jobs:
build-and-test:
Expand Down
25 changes: 25 additions & 0 deletions .lighthouserc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
module.exports = {
ci: {
collect: {
// Spécifiez les options de collecte ici
// Par exemple, vous pouvez définir le nombre de runs et les URL à tester
numberOfRuns: 3,
url: [
'https://agir.beta.gouv.fr/',
'https://agir.beta.gouv.fr/onboarding',
'https://agir.beta.gouv.fr/authentification',
'https://agir.beta.gouv.fr/creation-compte',
'https://agir.beta.gouv.fr/vos-aides/',
], // Remplacez par l'URL de votre app en développement ou en production
},
assert: {
assertions: {
'categories:performance': ['error', { minScore: 0.1 }],
'categories:accessibility': ['error', { minScore: 0.1 }],
},
},
upload: {
target: 'temporary-public-storage', // Pour tester, utilisez 'temporary-public-storage'
},
},
};

0 comments on commit 9880408

Please sign in to comment.