Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run tests without a specific version of chrome #3211

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 1 addition & 12 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
test:
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
name: test (ruby ${{ matrix.ruby }} / rails ${{ matrix.rails_version }} / blacklight ${{ matrix.blacklight_version }} ${{ matrix.additional_name }})
strategy:
matrix:
Expand Down Expand Up @@ -41,20 +41,9 @@ jobs:
ENGINE_CART_RAILS_OPTIONS: "--skip-git --skip-listen --skip-spring --skip-keeps --skip-coffee --skip-test ${{ matrix.additional_engine_cart_rails_options }}"
steps:
- uses: actions/checkout@v4
# Remove these Chrome steps after https://issues.chromium.org/issues/351858989 is fixed
- name: Setup a specific version of Chrome
uses: browser-actions/setup-chrome@v1
id: setup-chrome
with:
chrome-version: 126
install-chromedriver: true
install-dependencies: true
- name: Set CHROME_BIN environment variable
run: echo "CHROME_BIN=${{ steps.setup-chrome.outputs.chrome-path }}" >> $GITHUB_ENV
- name: Set up Ruby ${{ matrix.ruby }}
uses: ruby/setup-ruby@v1
with:
bundler-cache: false
bundler: "latest"
ruby-version: ${{ matrix.ruby }}
- name: Change permissions
Expand Down
10 changes: 1 addition & 9 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,7 @@
require 'selenium-webdriver'
require 'webmock/rspec'

Capybara.register_driver :selenium_chrome_headless do |app|
browser_options = Selenium::WebDriver::Chrome::Options.new
browser_options.add_argument('--window-size=1920,1080')
browser_options.add_argument('--headless')
browser_options.binary = ENV['CHROME_BIN'] if ENV['CHROME_BIN']
Capybara::Selenium::Driver.new(app, browser: :chrome, options: browser_options)
end

Capybara.javascript_driver = :selenium_chrome_headless
Capybara.javascript_driver = :selenium_headless

allowed_sites = ['chromedriver.storage.googleapis.com']

Expand Down
Loading