diff --git a/.github/workflows/lighthouse.yml b/.github/workflows/lighthouse.yml new file mode 100644 index 0000000000..822722c07a --- /dev/null +++ b/.github/workflows/lighthouse.yml @@ -0,0 +1,16 @@ +name: CI +on: [push] +jobs: + lighthouseci: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 16 + - uses: pnpm/action-setup@v2 + with: + version: 8 + - run: pnpm install && pnpm install -g @lhci/cli + - run: pnpm run build + - run: lhci autorun \ No newline at end of file diff --git a/.gitignore b/.gitignore index 9262476874..e98ac71398 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,7 @@ node_modules /package .env .env.* +.lighthouseci !.env.example vite.config.js.timestamp-* vite.config.ts.timestamp-* diff --git a/lighthouserc.cjs b/lighthouserc.cjs new file mode 100644 index 0000000000..a29f825354 --- /dev/null +++ b/lighthouserc.cjs @@ -0,0 +1,17 @@ +module.exports = { + ci: { + assert: { + preset: "lighthouse:recommended", + }, + collect: { + url: ['http://localhost:4173/'], + startServerCommand: 'pnpm preview', + settings: { + preset: 'desktop', + } + }, + upload: { + target: 'temporary-public-storage', + }, + }, +}; \ No newline at end of file