diff --git a/.github/workflows/lighthouse.yml b/.github/workflows/lighthouse.yml new file mode 100644 index 0000000..93c159e --- /dev/null +++ b/.github/workflows/lighthouse.yml @@ -0,0 +1,14 @@ +name: Lighthouse +on: [push] + +jobs: + lighthouseci: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 18 + - run: npm install && npm install -g @lhci/cli@0.13.x + - run: npm run build + - run: lhci autorun diff --git a/lighthouserc.json b/lighthouserc.json new file mode 100644 index 0000000..8b7c842 --- /dev/null +++ b/lighthouserc.json @@ -0,0 +1,18 @@ +{ + "ci": { + "collect": { + "numberOfRuns": 1, + "settings": { + "preset": "desktop" + } + }, + "assert": { + "assertions": { + "categories:performance": ["warn", { "minScore": 0.9 }], + "categories:accessibility": ["warn", { "minScore": 0.9 }], + "categories:best-practices": ["warn", { "minScore": 0.9 }], + "categories:seo": ["warn", { "minScore": 0.9 }] + } + } + } +}