feat: lighthouse ci pipeline #36
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
pull_request: | |
branches: | |
- "**" | |
jobs: | |
lhci: | |
name: Lighthouse | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js 18.x | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18.x | |
# - name: Install dependencies | |
# run: | | |
# npm install | |
# npm run build | |
# - name: run Lighthouse CI for the Application | |
# run: | | |
# npm install -g @lhci/[email protected] | |
# lhci autorun --config=lighthouserc.json | |
# - name: run Lighthouse CI for Keploy.io Deployed Website | |
# run: | | |
# npm install -g @lhci/[email protected] | |
# lhci autorun --config=lighthouserckeploy.json | |
# After running LHCI for the Application | |
# - name: List Application Reports | |
# run: ls -la ./lhci-reports/app/latest-run/ | |
# # After running LHCI for Keploy.io | |
# - name: List Keploy.io Reports | |
# run: ls -la ./lhci-reports/keploy.io/latest-run/ | |
- name: Compare Lighthouse Reports | |
run: | | |
pwd | |
ls | |
echo "Comparing Lighthouse Reports" | |
cd scripts | |
ls | |
pwd | |
echo "check 2" | |
cd .. | |
pwd | |
node compare-lhci-reports.js | |
- name: Upload Lighthouse Reports | |
uses: actions/upload-artifact@v3 | |
with: | |
name: lhci-reports | |
path: ./lhci-reports |