@@ -106,54 +106,34 @@ jobs:
106
106
run : |
107
107
sphinx-build -b html docs/ docs/_build/html
108
108
109
- # Serve the docs and wait to be ready
109
+ # The lighthouse audit runs directly on the HTML files, no serving needed
110
+ - name : Audit with Lighthouse
111
+ uses : treosh/lighthouse-ci-action@v8
112
+ with :
113
+ configPath : " .github/workflows/lighthouserc.json"
114
+ temporaryPublicStorage : true
115
+ uploadArtifacts : true
116
+ runs : 3 # Multiple runs to reduce variance
117
+ urls : |
118
+ demo/kitchen-sink/paragraph-markup.html
119
+ demo/example_pandas.html
120
+ demo/theme-elements.html
121
+
122
+ # Serve the docs for auditing with pa11y
110
123
- name : Serve the built site
111
124
run : |
112
125
nohup python docs/serve.py --port=${PORT} --host=${HOST} &
113
126
curl --retry 10 --retry-connrefused --retry-max-time 60 ${URL}/index.html
114
127
115
- # Run the audit
116
- # TODO: use the hosted API with a secret? would allow for comparison over time...
117
- - name : Make folder for Lighthouse reports
118
- run : mkdir -p /tmp/lighthouse/lighthouse-${{ github.run_number }}
119
-
120
- - name : Run Lighthouse on Site
121
- id : lighthouse
122
- uses :
foo-software/[email protected]
123
- with :
124
- # TODO: generate this list to audit all html pages
125
- urls : >-
126
- ${{ env.URL }}/index.html,
127
- ${{ env.URL }}/demo/api.html,
128
- ${{ env.URL }}/demo/kitchen-sink/paragraph-markup.html,
129
- ${{ env.URL }}/demo/kitchen-sink/lists-and-tables.html,
130
- ${{ env.URL }}/demo/example_pandas.html,
131
- ${{ env.URL }}/user_guide/accessibility.html
132
- outputDirectory : /tmp/lighthouse/lighthouse-${{ github.run_number }}
133
- verbose : true
134
-
135
- - name : Run the accessibility audit
128
+ - name : Audit with pa11y
136
129
run : python docs/scripts/a11y.py --no-serve
137
130
138
- # Check the audit for threshold values
139
- # TODO: write this someplace after a PR is merged, and load?
140
- - name : Assess Lighthouse Check results
141
- uses :
foo-software/[email protected]
142
- with :
143
- lighthouseCheckResults : ${{ steps.lighthouse.outputs.lighthouseCheckResults }}
144
- minAccessibilityScore : " 96"
145
- minBestPracticesScore : " 85"
146
- minPerformanceScore : " 10"
147
- minSeoScore : " 80"
148
- if : always()
149
-
150
- - name : Publish Audit reports
131
+ - name : Publish pa11y report
151
132
uses : actions/upload-artifact@v2
152
133
with :
153
- name : Pa11y and Lighthouse ${{ github.run_number }}
134
+ name : Pa11y ${{ github.run_number }}
154
135
path : |
155
136
/tmp/pa11y
156
- /tmp/lighthouse
157
137
if : always()
158
138
159
139
publish :
0 commit comments