- name: Upload screenshots of failures uses: actions/[email protected] if: ${{ failure() }} with: name: capybara-screenshots-${{ github.sha }} path: tmp/capybara/screenshot_* retention-days: 30 # in Gemfile gem 'capybara-screenshot', group: :test # in rails_helper.rb Capybara.asset_host = 'http://localhost:3000' require 'capybara/rspec' require 'capybara-screenshot/rspec'