Skip to content

Commit 35ef673

Browse files
committed
run tests in 3 versions of Selenium
1 parent 568cc8f commit 35ef673

File tree

4 files changed

+61
-17
lines changed

4 files changed

+61
-17
lines changed

.github/workflows/tests.yml

Lines changed: 46 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on: [push, pull_request]
44

55
jobs:
66
lint:
7+
name: Linter Tests
78
runs-on: ubuntu-18.04
89
steps:
910
- name: Cancel any previous run(s) on new commit push
@@ -20,32 +21,61 @@ jobs:
2021
run: bundle exec rake rubocop
2122

2223
test-selenium-v3:
24+
name: Selenium 3.142.7 Tests
2325
runs-on: ${{ matrix.os }}
2426
strategy:
27+
fail-fast: false
2528
matrix:
2629
os: [ubuntu-18.04, macos-10.15, windows-2019]
27-
ruby-version: [2.4, 2.5, 2.6, 2.7, 3.0, jruby]
30+
env:
31+
BUNDLE_GEMFILE: gemfiles/Gemfile.cur
2832
steps:
29-
- name: Cancel any previous run(s) on new commit push
30-
uses: styfle/cancel-workflow-action@0.7.0
31-
with:
32-
access_token: ${{ github.token }}
33-
- uses: actions/checkout@v2
34-
- name: Set up Ruby
35-
uses: ruby/setup-ruby@v1
36-
with:
37-
ruby-version: ${{ matrix.ruby-version }}
38-
bundler-cache: true
39-
- name: Run tests
40-
run: bundle exec rake spec
33+
- name: Cancel any previous run(s) on new commit push
34+
uses: styfle/cancel-workflow-action@0.7.0
35+
with:
36+
access_token: ${{ github.token }}
37+
- uses: actions/checkout@v2
38+
- name: Set up Ruby
39+
uses: ruby/setup-ruby@v1
40+
with:
41+
ruby-version: 2.6
42+
bundler-cache: true
43+
- name: Run tests
44+
run: bundle exec rake spec
45+
46+
test-selenium-old:
47+
name: Selenium 3.142.0 Tests
48+
runs-on: ${{ matrix.os }}
49+
strategy:
50+
fail-fast: false
51+
matrix:
52+
os: [ubuntu-18.04, macos-10.15, windows-2019]
53+
env:
54+
BUNDLE_GEMFILE: gemfiles/Gemfile.old
55+
steps:
56+
- name: Cancel any previous run(s) on new commit push
57+
uses: styfle/cancel-workflow-action@0.7.0
58+
with:
59+
access_token: ${{ github.token }}
60+
- uses: actions/checkout@v2
61+
- name: Set up Ruby
62+
uses: ruby/setup-ruby@v1
63+
with:
64+
ruby-version: 2.6
65+
bundler-cache: true
66+
- name: Run tests
67+
run: bundle exec rake spec
4168

4269
test-selenium-v4:
70+
name: Selenium 4 Tests
4371
runs-on: ${{ matrix.os }}
4472
strategy:
73+
fail-fast: false
4574
matrix:
46-
os: [macos-10.15, windows-2019]
75+
os: [ubuntu-18.04, macos-10.15, windows-2019]
76+
ruby-version: [2.6, 2.7, 3.0, jruby]
4777
env:
48-
BUNDLE_GEMFILE: gemfiles/Gemfile.edge # Uses Selenium v4 for Edge (Chromium)
78+
BUNDLE_GEMFILE: gemfiles/Gemfile.new # Uses Selenium v4 for Edge (Chromium)
4979
steps:
5080
- name: Cancel any previous run(s) on new commit push
5181
uses: styfle/cancel-workflow-action@0.7.0
@@ -55,7 +85,7 @@ jobs:
5585
- name: Set up Ruby
5686
uses: ruby/setup-ruby@v1
5787
with:
58-
ruby-version: 2.7
88+
ruby-version: ${{ matrix.ruby-version }}
5989
bundler-cache: true
6090
- name: Link libc++.dylib for msedgedriver
6191
# Work around for msedgedriver releases, like v86 and v87, that require libc++.dylib to run.

gemfiles/Gemfile.edge renamed to gemfiles/Gemfile.cur

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ source 'https://rubygems.org'
44

55
# Specify your gem's dependencies in webdrivers.gemspec
66
gemspec path: '..'
7-
gem 'selenium-webdriver', '>= 4.0.0.beta1'
7+
gem 'selenium-webdriver', '= 3.142.7'

gemfiles/Gemfile.new

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# frozen_string_literal: true
2+
3+
source 'https://rubygems.org'
4+
5+
# Specify your gem's dependencies in webdrivers.gemspec
6+
gemspec path: '..'
7+
gem 'selenium-webdriver', '= 4.0.0'

gemfiles/Gemfile.old

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# frozen_string_literal: true
2+
3+
source 'https://rubygems.org'
4+
5+
# Specify your gem's dependencies in webdrivers.gemspec
6+
gemspec path: '..'
7+
gem 'selenium-webdriver', '= 3.142.0'

0 commit comments

Comments
 (0)