From a95e0d5a7f2d4682066eca12f40b4ac694d43559 Mon Sep 17 00:00:00 2001 From: Mathieu Jobin Date: Fri, 16 Dec 2022 16:19:26 +0900 Subject: [PATCH] setup github actions --- .github/workflows/test-suite.yml | 46 ++++++++++++++++++++++++++++++++ .gitignore | 1 + capybara-angular.gemspec | 5 ++-- gemfiles/Gemfile.rails-5.0.x | 5 ++++ gemfiles/Gemfile.rails-5.1.x | 5 ++++ gemfiles/Gemfile.rails-5.2.x | 5 ++++ gemfiles/Gemfile.rails-6.0.x | 5 ++++ gemfiles/Gemfile.rails-6.1.x | 5 ++++ gemfiles/Gemfile.rails-7.0.x | 5 ++++ gemfiles/Gemfile.rails-edge | 5 ++++ spec/capybara/angular_spec.rb | 2 ++ 11 files changed, 87 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/test-suite.yml create mode 100644 gemfiles/Gemfile.rails-5.0.x create mode 100644 gemfiles/Gemfile.rails-5.1.x create mode 100644 gemfiles/Gemfile.rails-5.2.x create mode 100644 gemfiles/Gemfile.rails-6.0.x create mode 100644 gemfiles/Gemfile.rails-6.1.x create mode 100644 gemfiles/Gemfile.rails-7.0.x create mode 100644 gemfiles/Gemfile.rails-edge diff --git a/.github/workflows/test-suite.yml b/.github/workflows/test-suite.yml new file mode 100644 index 0000000..5c2de17 --- /dev/null +++ b/.github/workflows/test-suite.yml @@ -0,0 +1,46 @@ +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. +# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake +# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby + +name: test-suite + +on: [push, pull_request] + +jobs: + test: + runs-on: ubuntu-20.04 + strategy: + fail-fast: false + matrix: + gemfile: ["rails-7.0.x"] + ruby: [2.7] + include: + - gemfile: rails-7.0.x + ruby: '2.7' + - gemfile: rails-6.1.x + ruby: 2.7 + - gemfile: rails-6.1.x + ruby: 2.6 + - gemfile: rails-6.0.x + ruby: 2.7 + - gemfile: rails-6.0.x + ruby: 2.6 + - gemfile: rails-5.2.x + ruby: 2.6 + - gemfile: rails-5.1.x + ruby: 2.5 + - gemfile: rails-5.0.x + ruby: 2.5 + + env: + BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/Gemfile.${{ matrix.gemfile }} + steps: + - uses: actions/checkout@v2 + - uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby }} + bundler-cache: true + - run: bundle exec rspec diff --git a/.gitignore b/.gitignore index f70ad33..7a48b02 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,7 @@ .yardoc .rvmrc Gemfile.lock +gemfiles/*.lock InstalledFiles _yardoc coverage diff --git a/capybara-angular.gemspec b/capybara-angular.gemspec index 0f03d37..add3926 100644 --- a/capybara-angular.gemspec +++ b/capybara-angular.gemspec @@ -20,9 +20,10 @@ Gem::Specification.new do |spec| spec.add_dependency 'capybara', '>= 2.5.0' - spec.add_development_dependency "bundler", "~> 1.3" + spec.add_development_dependency "bundler", "> 1.17", "< 3" + spec.add_development_dependency "rails" spec.add_development_dependency "rake" spec.add_development_dependency "rspec" spec.add_development_dependency "poltergeist" - spec.add_development_dependency "puma" + spec.add_development_dependency "puma", "< 6" end diff --git a/gemfiles/Gemfile.rails-5.0.x b/gemfiles/Gemfile.rails-5.0.x new file mode 100644 index 0000000..d7b2c9f --- /dev/null +++ b/gemfiles/Gemfile.rails-5.0.x @@ -0,0 +1,5 @@ +source 'https://rubygems.org' + +gemspec path: '../' + +gem 'activerecord', '~> 5.0.0' diff --git a/gemfiles/Gemfile.rails-5.1.x b/gemfiles/Gemfile.rails-5.1.x new file mode 100644 index 0000000..512c342 --- /dev/null +++ b/gemfiles/Gemfile.rails-5.1.x @@ -0,0 +1,5 @@ +source 'https://rubygems.org' + +gemspec path: '../' + +gem 'activerecord', '~> 5.1.0' diff --git a/gemfiles/Gemfile.rails-5.2.x b/gemfiles/Gemfile.rails-5.2.x new file mode 100644 index 0000000..21599b8 --- /dev/null +++ b/gemfiles/Gemfile.rails-5.2.x @@ -0,0 +1,5 @@ +source 'https://rubygems.org' + +gemspec path: '../' + +gem 'activerecord', '~> 5.2.0' diff --git a/gemfiles/Gemfile.rails-6.0.x b/gemfiles/Gemfile.rails-6.0.x new file mode 100644 index 0000000..e1287f9 --- /dev/null +++ b/gemfiles/Gemfile.rails-6.0.x @@ -0,0 +1,5 @@ +source 'https://rubygems.org' + +gemspec path: '../' + +gem 'activerecord', '~> 6.0.0' diff --git a/gemfiles/Gemfile.rails-6.1.x b/gemfiles/Gemfile.rails-6.1.x new file mode 100644 index 0000000..4c19ba4 --- /dev/null +++ b/gemfiles/Gemfile.rails-6.1.x @@ -0,0 +1,5 @@ +source 'https://rubygems.org' + +gemspec path: '../' + +gem 'activerecord', '~> 6.1.0' diff --git a/gemfiles/Gemfile.rails-7.0.x b/gemfiles/Gemfile.rails-7.0.x new file mode 100644 index 0000000..dffc637 --- /dev/null +++ b/gemfiles/Gemfile.rails-7.0.x @@ -0,0 +1,5 @@ +source 'https://rubygems.org' + +gemspec path: '../' + +gem 'activerecord', '~> 7.0.0' diff --git a/gemfiles/Gemfile.rails-edge b/gemfiles/Gemfile.rails-edge new file mode 100644 index 0000000..4d965e9 --- /dev/null +++ b/gemfiles/Gemfile.rails-edge @@ -0,0 +1,5 @@ +source 'https://rubygems.org' + +gemspec path: '../' + +gem 'activerecord', github: 'rails/rails' diff --git a/spec/capybara/angular_spec.rb b/spec/capybara/angular_spec.rb index d39a79d..669a1dd 100644 --- a/spec/capybara/angular_spec.rb +++ b/spec/capybara/angular_spec.rb @@ -1,4 +1,6 @@ require 'rack' +require 'puma' +require 'rack/handler/puma' require 'capybara' require 'capybara/rspec' require 'capybara/poltergeist'