File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -133,4 +133,4 @@ jobs:
133133 smoke-url : https://catalog-dev.data.gov/
134134 smoke-path : /
135135 basic_auth_user : ${{ secrets.BASIC_AUTH_USER }}
136- basic_auth_password : ${{ secrets.BASIC_AUTH_PASSWORD }}
136+ basic_auth_password : ${{ secrets.BASIC_AUTH_PASSWORD }}
Original file line number Diff line number Diff line change 5858 smoke-url : https://catalog.data.gov/
5959 smoke-path : /
6060 # basic auth on prod is turned off
61+
62+ lighthouse :
63+ name : Lighthouse CI Audit
64+ needs : deploy-prod
65+ runs-on : ubuntu-latest
66+ continue-on-error : true
67+ steps :
68+ - name : Check out the code
69+ uses : actions/checkout@v4
70+
71+ - name : Set up Node.js
72+ uses : actions/setup-node@v4
73+ with :
74+ node-version : " 20"
75+
76+ - name : Install Lighthouse CI
77+ run : npm install -g @lhci/cli
78+
79+ - name : Collect Lighthouse results
80+ run : |
81+ lhci collect \
82+ --url="https://catalog.data.gov" \
83+ --url="https://catalog.data.gov/organization" \
84+ --url="https://catalog.data.gov/organization/gsa" \
85+ --url="https://catalog.data.gov/dataset/gsa-enterprise-data-inventory-edi" \
86+ --numberOfRuns=1
87+
88+ - name : Upload to filesystem
89+ run : |
90+ lhci upload \
91+ --target=filesystem \
92+ --outputDir=./lighthouse-results
93+
94+ - name : Assert thresholds
95+ run : |
96+ output=$(lhci assert --config=lighthouserc.yml 2>&1) || {
97+ echo "$output" | while IFS= read -r line; do
98+ [[ -n "$line" ]] && echo "::error::$line"
99+ done
100+ exit 1
101+ }
102+
103+ - name : Upload Lighthouse results
104+ uses : actions/upload-artifact@v4
105+ if : always()
106+ with :
107+ name : lighthouse-results
108+ path : ./lighthouse-results/**/*.html
109+ retention-days : 7
Original file line number Diff line number Diff line change 1+ ci :
2+ assert :
3+ assertions :
4+ categories:performance :
5+ - error
6+ - minScore : 0.4
7+ categories:accessibility :
8+ - error
9+ - minScore : 0.75
10+ categories:best-practices :
11+ - error
12+ - minScore : 0.75
13+ categories:seo :
14+ - error
15+ - minScore : 0.75
You can’t perform that action at this time.
0 commit comments