Skip to content

Commit e79e735

Browse files
authored
Remove lighthouse from build workflow (#1136)
chore: Remove lighthouse from build workflow
1 parent b68d3bd commit e79e735

File tree

5 files changed

+58
-1803
lines changed

5 files changed

+58
-1803
lines changed

.github/workflows/build-push.yml

Lines changed: 1 addition & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -115,51 +115,4 @@ jobs:
115115
}
116116
env:
117117
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_FRIENDS_OF_DOCS }}
118-
PREVIEW_URL: ${{ needs.call-docs-build-push.outputs.PREVIEW_URL }}
119-
120-
121-
lighthouseci:
122-
if: github.event.pull_request
123-
needs: call-docs-build-push
124-
runs-on: ubuntu-22.04
125-
steps:
126-
- uses: actions/checkout@v5
127-
with:
128-
ref: ${{ github.event.workflow_run.head_branch }}
129-
- uses: actions/setup-node@v5
130-
with:
131-
node-version: 18
132-
- name: Installing packages
133-
run: npm install
134-
- name: Generating lighthouse reports for PR and main...
135-
run: |
136-
node lighthouse-script.js
137-
- name: Compare the artifacts for negative differences in performance
138-
continue-on-error: true
139-
run: |
140-
FIELDS=("performance" "accessibility")
141-
for FIELD in "${FIELDS[@]}"; do
142-
PR_VALUE=$(cat lighthouse-reports/pr-report.json | jq -r ".categories.$FIELD.score")
143-
MAIN_VALUE=$(cat lighthouse-reports/main-report.json | jq -r ".categories.$FIELD.score")
144-
echo "$FIELD: PR - $PR_VALUE | Main - $MAIN_VALUE"
145-
146-
if [ $FIELD = "performance" ]; then
147-
LOWER_BOUND=$(echo "$MAIN_VALUE - 0.05" | bc)
148-
UPPER_BOUND=$(echo "$MAIN_VALUE + 0.05" | bc)
149-
if (( $(echo "$PR_VALUE < $LOWER_BOUND" | bc -l) || $(echo "$PR_VALUE > $UPPER_BOUND" | bc -l) )); then
150-
echo "Error: $FIELD score in PR ($PR_VALUE) is less than in MAIN ($MAIN_VALUE)"
151-
exit 1
152-
fi
153-
else
154-
if (( $(echo "$PR_VALUE < $MAIN_VALUE" | bc -l) )); then
155-
echo "Error: $FIELD score in PR ($PR_VALUE) is less than in MAIN ($MAIN_VALUE)"
156-
exit 1
157-
fi
158-
fi
159-
done
160-
- uses: actions/upload-artifact@v4
161-
if: ${{ !cancelled() }}
162-
with:
163-
name: lighthouse-reports
164-
path: lighthouse-reports/
165-
retention-days: 30
118+
PREVIEW_URL: ${{ needs.call-docs-build-push.outputs.PREVIEW_URL }}

.gitignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,6 @@ resources/
3535
.netlify/plugins/*
3636
.netlify/
3737

38-
# Local Lighthouse artifacts
39-
lighthouse-reports
40-
4138
*.pyc
4239
build
4340
*.swp

lighthouse-script.js

Lines changed: 0 additions & 53 deletions
This file was deleted.

0 commit comments

Comments
 (0)