Skip to content

Commit

Permalink
feat: lighthouse user ci 세팅
Browse files Browse the repository at this point in the history
  • Loading branch information
SEOKKAMONI committed Oct 18, 2023
1 parent 1ec5bff commit 6280240
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 21 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
name: Lighthouse CI
name: Lighthouse CI - USER

on:
pull_request:
branches-ignore:
- 'dependabot/**'
- 'imgbot'
paths:
- 'apps/user/src/**'

jobs:
lhci:
Expand Down Expand Up @@ -44,7 +46,7 @@ jobs:
id: format_lighthouse_score
uses: actions/github-script@v3
with:
github-token: ${{secrets.GITHUB_TOKEN}}
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const createComments = require(process.cwd() + '/scripts/lighthouse.js');
core.setOutput('comments', createComments());
Expand Down
2 changes: 1 addition & 1 deletion .lighthouserc.js → apps/user/.lighthouserc.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module.exports = {
collect: {
startServerCommand: 'pnpm dev',
numberOfRuns: 1,
url: ['http://localhost:3000', 'http://localhost:3001'],
url: ['http://localhost:3000'],
settings: { preset: 'desktop' },
},
upload: {
Expand Down
2 changes: 2 additions & 0 deletions apps/user/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@
"build": "next build",
"start": "next start",
"lint": "next lint",
"lighthouse": "lhci autorun",
"storybook": "storybook dev -p 6006",
"build-storybook": "storybook build"
},
"devDependencies": {
"@lhci/cli": "^0.12.0",
"@maru/eslint": "workspace:*",
"@maru/tsconfig": "workspace:*",
"@storybook/addon-essentials": "^7.3.1",
Expand Down
4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
"dev": "turbo run dev",
"lint": "turbo run lint",
"format": "prettier --write \"**/*.{ts,tsx,md}\"",
"prepare": "husky install",
"lighthouse": "lhci autorun"
"prepare": "husky install"
},
"name": "marururu",
"packageManager": "pnpm@8.6.7",
Expand All @@ -18,7 +17,6 @@
"devDependencies": {
"@commitlint/cli": "^17.8.0",
"@commitlint/config-conventional": "^17.8.0",
"@lhci/cli": "^0.12.0",
"@maru/eslint": "workspace:*",
"@turbo/gen": "^1.9.7",
"eslint": "^7.32.0",
Expand Down
30 changes: 15 additions & 15 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 6280240

Please sign in to comment.