Skip to content

Commit 0588496

Browse files
sambhavgupta0705asyncapi-botTRohit20akshatnema
authored
fix: refactor lighthouse failing check (#4170)
Co-authored-by: Sambhav Gupta <sambhavgupta0705@gmail.com> Co-authored-by: Chan <bot+chan@asyncapi.io> Co-authored-by: Rohit <108233235+TRohit20@users.noreply.github.com> Co-authored-by: Akshat Nema <76521428+akshatnema@users.noreply.github.com>
1 parent 62fab51 commit 0588496

File tree

2 files changed

+30
-22
lines changed

2 files changed

+30
-22
lines changed

.github/workflows/lighthouse-ci.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
run: echo "shouldrun=true" >> $GITHUB_OUTPUT
3636
3737
- if: steps.should_run.outputs.shouldrun == 'true'
38-
uses: actions/checkout@v3
38+
uses: actions/checkout@v4
3939

4040
- if: steps.should_run.outputs.shouldrun == 'true'
4141
name: Await Netlify Preview
@@ -46,18 +46,26 @@ jobs:
4646
max_timeout: 600
4747

4848
- if: steps.should_run.outputs.shouldrun == 'true'
49-
name: Lighthouse Audit
49+
name: Run Lighthouse Audit
5050
id: lighthouse_audit
5151
uses: treosh/lighthouse-ci-action@03becbfc543944dd6e7534f7ff768abb8a296826 #version 10.1 https://github.com/treosh/lighthouse-ci-action/releases/tag/10.1.0
5252
with:
5353
urls: |
5454
https://deploy-preview-$PR_NUMBER--asyncapi-website.netlify.app/
5555
configPath: ./.github/workflows/lighthouserc.json
56-
uploadArtifacts: true
56+
uploadArtifacts: false
5757
temporaryPublicStorage: true
5858
env:
5959
PR_NUMBER: ${{ github.event.pull_request.number}}
6060

61+
- if: steps.should_run.outputs.shouldrun == 'true'
62+
name: Upload Lighthouse Artifacts
63+
uses: actions/upload-artifact@v4
64+
with:
65+
name: lighthouse-report
66+
path: .lighthouseci
67+
include-hidden-files: true
68+
6169
- if: steps.should_run.outputs.shouldrun == 'true'
6270
name: Lighthouse Score Report
6371
id: lighthouse_score_report
Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
{
2-
"ci": {
3-
"assert": {
4-
"assertions": {
5-
"categories:accessibility": ["error", {"minScore": 0.98}],
6-
"categories:best-practices": ["error", {"minScore": 0.92}],
7-
"categories:seo": ["error", {"minScore": 1.00}]
8-
}
9-
},
10-
"collect": {
11-
"settings": {
12-
"skipAudits": [
13-
"robots-txt",
14-
"canonical",
15-
"tap-targets",
16-
"is-crawlable",
17-
"works-offline",
18-
"offline-start-url"
19-
]
20-
}
2+
"ci": {
3+
"assert": {
4+
"assertions": {
5+
"categories:accessibility": ["error", {"minScore": 0.98}],
6+
"categories:best-practices": ["error", {"minScore": 0.92}],
7+
"categories:seo": ["error", {"minScore": 1.00}]
8+
}
9+
},
10+
"collect": {
11+
"settings": {
12+
"skipAudits": [
13+
"robots-txt",
14+
"canonical",
15+
"tap-targets",
16+
"is-crawlable",
17+
"works-offline",
18+
"offline-start-url"
19+
]
2120
}
2221
}
2322
}
23+
}

0 commit comments

Comments
 (0)