Skip to content

Commit a3ce546

Browse files
authored
feat: have ci capture capybara screenshots and lighthouse results in rspec output artifact (#624)
The newest version of [`lighthouse-matchers` has audit results written to disk](ackama/lighthouse-matchers#68) to make it easier to debug why a score was lower than expected, so this has our standard CI capture those in the rspec output artifacts, along with capybara screenshots
1 parent 1ea6aaf commit a3ce546

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

variants/accessibility/spec/rails_helper.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,6 @@
1010
# Lighthouse Matcher options
1111
options.add_argument("--remote-debugging-port=9222")
1212
Lighthouse::Matchers.chrome_flags = %w[headless=new no-sandbox]
13+
Lighthouse::Matchers.results_directory = Rails.root.join("tmp/lighthouse")
1314
OPTIONS
1415
end

variants/github_actions_ci/workflows/ci.yml.tt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,11 @@ jobs:
117117
uses: actions/upload-artifact@v4
118118
if: success() || failure()
119119
with:
120-
name: rspec-output-screenshots
121-
path: tmp/screenshots
120+
name: rspec-output-results
121+
path: |
122+
tmp/capybara
123+
tmp/screenshots
124+
tmp/lighthouse
122125
retention-days: 5
123126

124127
# ACTION REQUIRED:

0 commit comments

Comments
 (0)