mirror of
https://github.com/teamcapybara/capybara.git
synced 2022-11-09 12:08:07 -05:00
Update CI config for Ruby 3.0 release and update rubocop
This commit is contained in:
parent
8510765c68
commit
ca4f9aa001
4 changed files with 17 additions and 7 deletions
|
@ -1,6 +1,8 @@
|
|||
require:
|
||||
- rubocop-rspec
|
||||
- rubocop-performance
|
||||
- rubocop-minitest
|
||||
- rubocop-rake
|
||||
|
||||
AllCops:
|
||||
NewCops: enable
|
||||
|
@ -29,7 +31,7 @@ Metrics/BlockLength:
|
|||
- 'spec/**/*'
|
||||
- 'lib/capybara/spec/**/*'
|
||||
- 'capybara.gemspec'
|
||||
ExcludedMethods:
|
||||
IgnoredMethods:
|
||||
- Capybara.add_selector
|
||||
- Capybara::Selector::FilterSet.add
|
||||
|
||||
|
|
|
@ -6,8 +6,8 @@ services:
|
|||
- docker
|
||||
- xvfb
|
||||
rvm:
|
||||
- 2.7
|
||||
- jruby-9.2.13.0
|
||||
- 3.0
|
||||
- jruby-9.2.14.0
|
||||
gemfile:
|
||||
- Gemfile
|
||||
env:
|
||||
|
@ -35,7 +35,7 @@ cache:
|
|||
matrix:
|
||||
include:
|
||||
- gemfile: gemfiles/Gemfile.gumbo
|
||||
rvm: 2.6
|
||||
rvm: 2.7
|
||||
script: bundle exec rake rack_smoke
|
||||
- gemfile: Gemfile
|
||||
rvm: 2.6
|
||||
|
@ -56,7 +56,7 @@ matrix:
|
|||
- gemfile: gemfiles/Gemfile.base-versions
|
||||
rvm: 2.5
|
||||
- gemfile: Gemfile
|
||||
rvm: 2.6
|
||||
rvm: 2.7
|
||||
env: HEADLESS=true
|
||||
- gemfile: gemfiles/Gemfile.beta-versions
|
||||
rvm: 2.6
|
||||
|
|
6
Rakefile
6
Rakefile
|
@ -18,6 +18,7 @@ RSpec::Core::RakeTask.new(:spec_firefox) do |t|
|
|||
end
|
||||
|
||||
%w[chrome ie edge chrome_remote firefox_remote safari].each do |driver|
|
||||
desc "Run tests using #{driver} driver"
|
||||
RSpec::Core::RakeTask.new(:"spec_#{driver}") do |t|
|
||||
t.rspec_opts = rspec_opts
|
||||
t.pattern = "./spec/{selenium_spec_#{driver}.rb}"
|
||||
|
@ -35,8 +36,10 @@ RSpec::Core::RakeTask.new(:spec_rack) do |t|
|
|||
t.pattern = './spec{,/*/**}/*{_spec.rb}'
|
||||
end
|
||||
|
||||
desc 'Run specs with Firefox'
|
||||
task spec: [:spec_firefox]
|
||||
|
||||
desc 'Run basic smoke tests (rack test and rubocop)'
|
||||
task rack_smoke: %i[rubocop spec_rack]
|
||||
|
||||
YARD::Rake::YardocTask.new do |t|
|
||||
|
@ -47,6 +50,7 @@ Cucumber::Rake::Task.new(:cucumber) do |task|
|
|||
task.cucumber_opts = ['--format=progress', 'features']
|
||||
end
|
||||
|
||||
desc 'Task for running CI'
|
||||
task :travis do
|
||||
if ENV['CAPYBARA_REMOTE'] && ENV['CAPYBARA_FF']
|
||||
Rake::Task[:spec_firefox_remote].invoke
|
||||
|
@ -64,6 +68,7 @@ task :travis do
|
|||
Rake::Task[:cucumber].invoke
|
||||
end
|
||||
|
||||
desc 'Build updated JS replacements for Selenium atoms'
|
||||
task :build_js do
|
||||
require 'uglifier'
|
||||
Dir.glob('./lib/capybara/selenium/atoms/src/*.js').each do |fn|
|
||||
|
@ -78,6 +83,7 @@ task :build_js do
|
|||
end
|
||||
end
|
||||
|
||||
desc 'Release new version'
|
||||
task :release do
|
||||
version = Capybara::VERSION
|
||||
puts "Releasing #{version}, y/n?"
|
||||
|
|
|
@ -47,8 +47,10 @@ Gem::Specification.new do |s|
|
|||
s.add_development_dependency('rspec', ['>= 3.5.0'])
|
||||
s.add_development_dependency('rspec-instafail')
|
||||
s.add_development_dependency('rubocop', ['~>1.1'])
|
||||
s.add_development_dependency('rubocop-minitest')
|
||||
s.add_development_dependency('rubocop-performance')
|
||||
s.add_development_dependency('rubocop-rspec', ['~>2.0.0.pre'])
|
||||
s.add_development_dependency('rubocop-rake')
|
||||
s.add_development_dependency('rubocop-rspec', ['~>2.0'])
|
||||
s.add_development_dependency('sauce_whisk')
|
||||
s.add_development_dependency('selenium_statistics')
|
||||
s.add_development_dependency('selenium-webdriver', ['~>3.5'])
|
||||
|
|
Loading…
Reference in a new issue