-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
15 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,22 @@ | ||
name: Lighthouse CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
on: [push] | ||
|
||
jobs: | ||
lhci: | ||
name: Lighthouse | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v2 | ||
- uses: actions/checkout@v3 | ||
- name: Use Node.js 16.x | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '14' | ||
|
||
- name: Install dependencies | ||
run: npm install | ||
|
||
- name: Build and serve | ||
run: npm run build && npm run serve & | ||
|
||
- name: Run Lighthouse CI | ||
run: npm run lhci | ||
node-version: 16.x | ||
- name: npm install, build | ||
run: | | ||
npm install | ||
npm run build | ||
- name: run Lighthouse CI | ||
run: | | ||
npm install -g @lhci/[email protected] | ||
lhci autorun |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,7 @@ | ||
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/'], // Remplacez par l'URL de votre app en développement ou en production | ||
}, | ||
assert: { | ||
assertions: { | ||
// Définissez ici les assertions pour les scores que vous voulez atteindre. | ||
// Exemple : 'categories:performance': ['error', {minScore: 0.9}] | ||
}, | ||
}, | ||
upload: { | ||
target: 'temporary-public-storage', // Pour tester, utilisez 'temporary-public-storage' | ||
target: 'temporary-public-storage', | ||
}, | ||
}, | ||
}; |