Skip to content

Commit bbf1b97

Browse files
committed
chore: Remove lighthouse from build workflow
1 parent b68d3bd commit bbf1b97

File tree

3 files changed

+1
-105
lines changed

3 files changed

+1
-105
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 }}

lighthouse-script.js

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

package.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,5 @@
1111
},
1212
"devDependencies": {
1313
"hugo-bin": "^0.111.3"
14-
},
15-
"dependencies": {
16-
"lighthouse": "^12.2.2",
17-
"puppeteer": "^23.8.0"
1814
}
1915
}

0 commit comments

Comments
 (0)