Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking โ€œSign up for GitHubโ€, you agree to our terms of service and privacy statement. Weโ€™ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: lighthouse setting #82

Open
wants to merge 41 commits into
base: dev
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
529c38a
feat: lighthouse setting
minsu-zip Aug 11, 2024
985500e
chore: branch name ์ˆ˜์ •
minsu-zip Aug 11, 2024
6de9436
chore: npm์œผ๋กœ ๋ณ€๊ฒฝ
minsu-zip Aug 11, 2024
01a82a9
chore: pnpm setting
minsu-zip Aug 11, 2024
7c9b281
chore: action ์ถ”๊ฐ€
minsu-zip Aug 11, 2024
d2a6ba6
chore: ํด๋” ๋„ค์ด๋ฐ ๋ณ€๊ฒฝ
minsu-zip Aug 11, 2024
90ba8c0
chore: path module import
minsu-zip Aug 11, 2024
d4ec2d3
chore: lhci ๊ฒฝ๋กœ ์ถœ๋ ฅ์„ ์œ„ํ•œ ํ…Œ์ŠคํŠธ
minsu-zip Aug 12, 2024
61e0497
chore: ๊ฒฝ๋กœ ์ •์˜๋ฅผ ์œ„ํ•œ ์„ค์ • ํŒŒ์ผ ์ถ”๊ฐ€
minsu-zip Aug 12, 2024
6cb9111
chore: build ์Šคํฌ๋ฆฝํŠธ ์ถ”๊ฐ€
minsu-zip Aug 12, 2024
a40642b
chore: env ์ถ”๊ฐ€
minsu-zip Aug 12, 2024
8d6791c
chore: ๋นŒ๋“œ ๊ฒฝ๋กœ ๋ณ€๊ฒฝ
minsu-zip Aug 12, 2024
40b1623
chore: ๋กœ์ปฌ์— ์ €์žฅํ•˜์ง€ ์•Š๊ณ  ๋ฐ”๋กœ pull request์— ์ž‘์„ฑ
minsu-zip Aug 12, 2024
3ac3c8b
fix: results ๋ณ€์ˆ˜๋ฅผ ์ •์˜ํ•˜์ง€ ์•Š๊ณ  ์‚ฌ์šฉํ•˜๋ ค๊ณ  ํ•ด์„œ ๋ฐœ์ƒํ•œ ์—๋Ÿฌ ์ˆ˜์ •
minsu-zip Aug 12, 2024
599b4e7
chore: setting
minsu-zip Aug 13, 2024
050be82
chore
minsu-zip Aug 13, 2024
ff4cee6
chore: await ์ œ๊ฑฐ
minsu-zip Aug 13, 2024
2b2e4a7
chore: yml ์ˆ˜์ •
minsu-zip Aug 13, 2024
e55908a
chore: ๊ฒฝ๋กœ ์ˆ˜์ •
minsu-zip Aug 13, 2024
5c23299
chore: console
minsu-zip Aug 13, 2024
d271967
chore: ์„œ๋ฒ„ ์‹คํ–‰ ๋กœ์ง ์ถ”๊ฐ€
minsu-zip Aug 13, 2024
735cffd
chore: ํ† ํฐ ์ฃผ์ž…
minsu-zip Aug 13, 2024
414ff7c
chore: ์„œ๋ฒ„ ์‹คํ–‰ ์ฝ”๋“œ ์ œ๊ฑฐ
minsu-zip Aug 13, 2024
4a1d388
chore: ์ฃผ์†Œ ๋ณ€๊ฒฝ
minsu-zip Aug 14, 2024
5ea7d57
chore: ํฌํŠธ๋ฒˆํ˜ธ ์ œ๊ฑฐ ํ…Œ์ŠคํŠธ
minsu-zip Aug 14, 2024
4f4828e
chore: url protocol ์ œ๊ฑฐ
minsu-zip Aug 14, 2024
cf396d2
chore: chrome flag ์ถ”๊ฐ€
minsu-zip Aug 14, 2024
0cdb80d
chore: flag ์ถ”๊ฐ€
minsu-zip Aug 14, 2024
15f3819
chore: test
minsu-zip Aug 14, 2024
03bc18e
chore: env ์ถ”๊ฐ€
minsu-zip Aug 14, 2024
0915b21
chore: report ์ œ๊ฑฐ
minsu-zip Aug 14, 2024
4d4d0b3
chore
minsu-zip Aug 14, 2024
d2fd5f2
setting: lhci/cli
minsu-zip Aug 14, 2024
98f20c7
chore: remove
minsu-zip Aug 14, 2024
3ffe5c5
Merge branch 'dev' into feat/MAFOO-84
minsu-zip Aug 14, 2024
4452f0a
setting
minsu-zip Aug 14, 2024
fe0bd99
chore
minsu-zip Aug 14, 2024
3692ba0
chore
minsu-zip Aug 14, 2024
9acfb17
chore
minsu-zip Aug 23, 2024
705060d
chore
minsu-zip Aug 23, 2024
17495bf
chore
minsu-zip Aug 23, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
chore: ๊ฒฝ๋กœ ์ˆ˜์ •
  • Loading branch information
minsu-zip committed Aug 13, 2024
commit e55908af1bbe6ff0772e5add19587720ee5f42bc
34 changes: 17 additions & 17 deletions .github/workflows/lighthouse.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,13 @@ jobs:
id: format_lighthouse_score
uses: actions/github-script@v3
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
const fs = require('fs');
const results = JSON.parse(fs.readFileSync("${{ env.working-directory }}/lhci_reports/manifest.json"));
let comments = "";
const path = require('path');
const resultsPath = path.join(process.env.GITHUB_WORKSPACE, 'lhci_reports', 'manifest.json');

const results = JSON.parse(fs.readFileSync(resultsPath));
let comments = ""

results.forEach((result,index) => {
const { summary } = result;
Expand All @@ -64,20 +66,20 @@ jobs:
Object.keys(summary).forEach(
(key) => (summary[key] = formatResult(summary[key]))
);

const score = (res) => (res >= 90 ? "๐ŸŸข" : res >= 70 ? "๐ŸŸ " : "๐Ÿ”ด");

const comment = [
`โšก๏ธ Lighthouse report ${index}`,
`| Category | Score |`,
`| --- | --- |`,
`| ${score(summary.performance)} Performance | ${summary.performance} |`,
`| ${score(summary.accessibility)} Accessibility | ${summary.accessibility} |`,
`| ${score(summary['best-practices'])} Best practices | ${summary['best-practices']} |`,
`| ${score(summary.seo)} SEO | ${summary.seo} |`,
`| ${score(summary.pwa)} PWA | ${summary.pwa} |`,
`\n`,
].join("\n");
`โšก๏ธ **Lighthouse report ${index + 1}**`,
`| Category | Score |`,
`|------------------------|-------|`,
`| ${score(summary.performance)} Performance | ${summary.performance} |`,
`| ${score(summary.accessibility)} Accessibility | ${summary.accessibility} |`,
`| ${score(summary['best-practices'])} Best practices | ${summary['best-practices']} |`,
`| ${score(summary.seo)} SEO | ${summary.seo} |`,
`| ${score(summary.pwa)} PWA | ${summary.pwa} |`,
`\n`,
].join("\n");

comments += comment + "\n";
});
Expand All @@ -86,7 +88,5 @@ jobs:

- name: comment PR
uses: unsplash/comment-on-pr@v1.3.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
msg: ${{ steps.format_lighthouse_score.outputs.comments}}
msg: ${{ steps.format_lighthouse_score.outputs.comments }}
Loading