Skip to content

Commit

Permalink
feature/IVYPORTAL-17377-Create-pipeline-to-run-Lighthouse-report
Browse files Browse the repository at this point in the history
  • Loading branch information
nhthinh-axonivy committed Dec 27, 2024
1 parent 331272e commit d9acbf2
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions .github/workflows/lighthouse-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -179,21 +179,6 @@ jobs:
--output=json \
--output=html \
--output-path="./report"
ls -la
env:
DISPLAY: ':99'

- name: Run Lighthouse Audit
run: |
mkdir -p ${{ env.REPORT_DIR }}
cd ${{ env.REPORT_DIR }}
npx lighthouse ${{ env.SERVER_URL }} \
--chrome-flags="--headless --no-sandbox --disable-gpu" \
--output=json \
--output=html \
--output-path="./report"
- name: Upload Report
id: upload-artifact
Expand All @@ -202,6 +187,20 @@ jobs:
name: lighthouse-report
path: ${{ env.REPORT_DIR }}

- name: Upload HTML Report
id: upload-html
uses: actions/upload-artifact@v4
with:
name: lighthouse-report-html
path: ${{ env.REPORT_DIR }}/report.report.html

- name: Upload JSON Report
id: upload-json
uses: actions/upload-artifact@v4
with:
name: lighthouse-report-json
path: ${{ env.REPORT_DIR }}/report.report.json

- name: Generate Report Summary
run: |
cd ${{ env.REPORT_DIR }}
Expand All @@ -218,7 +217,8 @@ jobs:
echo "---"
echo "## Reports"
echo "📋 [Download Full Report](${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/artifacts/${{ steps.upload-artifact.outputs.artifact-id }})"
echo "📊 [View HTML Report](https://github.com/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}/artifacts/${{ steps.upload-html.outputs.artifact-id }})"
echo "📋 [View JSON Report](https://github.com/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}/artifacts/${{ steps.upload-json.outputs.artifact-id }})"
} >> $GITHUB_STEP_SUMMARY
else
Expand Down

0 comments on commit d9acbf2

Please sign in to comment.