Skip to content

Commit

Permalink
run tests in 3 versions of Selenium
Browse files Browse the repository at this point in the history
  • Loading branch information
titusfortner committed Oct 14, 2021
1 parent 568cc8f commit 35ef673
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 17 deletions.
62 changes: 46 additions & 16 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on: [push, pull_request]

jobs:
lint:
name: Linter Tests
runs-on: ubuntu-18.04
steps:
- name: Cancel any previous run(s) on new commit push
Expand All @@ -20,32 +21,61 @@ jobs:
run: bundle exec rake rubocop

test-selenium-v3:
name: Selenium 3.142.7 Tests
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-18.04, macos-10.15, windows-2019]
ruby-version: [2.4, 2.5, 2.6, 2.7, 3.0, jruby]
env:
BUNDLE_GEMFILE: gemfiles/Gemfile.cur
steps:
- name: Cancel any previous run(s) on new commit push
uses: styfle/cancel-workflow-action@0.7.0
with:
access_token: ${{ github.token }}
- uses: actions/checkout@v2
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true
- name: Run tests
run: bundle exec rake spec
- name: Cancel any previous run(s) on new commit push
uses: styfle/cancel-workflow-action@0.7.0
with:
access_token: ${{ github.token }}
- uses: actions/checkout@v2
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6
bundler-cache: true
- name: Run tests
run: bundle exec rake spec

test-selenium-old:
name: Selenium 3.142.0 Tests
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-18.04, macos-10.15, windows-2019]
env:
BUNDLE_GEMFILE: gemfiles/Gemfile.old
steps:
- name: Cancel any previous run(s) on new commit push
uses: styfle/cancel-workflow-action@0.7.0
with:
access_token: ${{ github.token }}
- uses: actions/checkout@v2
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6
bundler-cache: true
- name: Run tests
run: bundle exec rake spec

test-selenium-v4:
name: Selenium 4 Tests
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-10.15, windows-2019]
os: [ubuntu-18.04, macos-10.15, windows-2019]
ruby-version: [2.6, 2.7, 3.0, jruby]
env:
BUNDLE_GEMFILE: gemfiles/Gemfile.edge # Uses Selenium v4 for Edge (Chromium)
BUNDLE_GEMFILE: gemfiles/Gemfile.new # Uses Selenium v4 for Edge (Chromium)
steps:
- name: Cancel any previous run(s) on new commit push
uses: styfle/cancel-workflow-action@0.7.0
Expand All @@ -55,7 +85,7 @@ jobs:
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true
- name: Link libc++.dylib for msedgedriver
# Work around for msedgedriver releases, like v86 and v87, that require libc++.dylib to run.
Expand Down
2 changes: 1 addition & 1 deletion gemfiles/Gemfile.edge → gemfiles/Gemfile.cur
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ source 'https://rubygems.org'

# Specify your gem's dependencies in webdrivers.gemspec
gemspec path: '..'
gem 'selenium-webdriver', '>= 4.0.0.beta1'
gem 'selenium-webdriver', '= 3.142.7'
7 changes: 7 additions & 0 deletions gemfiles/Gemfile.new
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# frozen_string_literal: true

source 'https://rubygems.org'

# Specify your gem's dependencies in webdrivers.gemspec
gemspec path: '..'
gem 'selenium-webdriver', '= 4.0.0'
7 changes: 7 additions & 0 deletions gemfiles/Gemfile.old
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# frozen_string_literal: true

source 'https://rubygems.org'

# Specify your gem's dependencies in webdrivers.gemspec
gemspec path: '..'
gem 'selenium-webdriver', '= 3.142.0'

0 comments on commit 35ef673

Please sign in to comment.