From 3b7b83b878f074d88fd96291569d034ea93a095e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20Ka=CC=88mper?= Date: Fri, 4 Oct 2024 12:32:02 +0200 Subject: [PATCH 1/9] Updates Ruby version & gems MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Stephan Kämper --- .ruby-version | 2 +- eqn.gemspec | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.ruby-version b/.ruby-version index 57cf282..fa7adc7 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -2.6.5 +3.3.5 diff --git a/eqn.gemspec b/eqn.gemspec index 03e0526..bf8e639 100644 --- a/eqn.gemspec +++ b/eqn.gemspec @@ -22,14 +22,14 @@ Gem::Specification.new do |spec| spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) } spec.require_paths = ['lib'] - spec.add_dependency 'treetop', '>= 1.2.0' + spec.add_dependency 'treetop', '>= 1.6.12' - spec.add_development_dependency 'appraisal', '~> 2.2.0' - spec.add_development_dependency 'bundler', '>= 1.9' + spec.add_development_dependency 'appraisal', '~> 2.5.0' + spec.add_development_dependency 'bundler', '>= 2.5' spec.add_development_dependency 'codeclimate-test-reporter', '~> 1.0' - spec.add_development_dependency 'rake', '~> 13.0' - spec.add_development_dependency 'rubocop', '~> 0.60' - spec.add_development_dependency 'rubocop-rspec', '~> 1.30' - spec.add_development_dependency 'rspec', '~> 3.5.0' - spec.add_development_dependency 'simplecov', '< 0.18' + spec.add_development_dependency 'rake', '~> 13.2' + spec.add_development_dependency 'rubocop', '~> 1.66' + spec.add_development_dependency 'rubocop-rspec', '~> 3.1.0' + spec.add_development_dependency 'rspec', '~> 3.13.0' + spec.add_development_dependency 'simplecov', '~> 0.22.0' end From 784b94dc86ba0bd4b025793a2d38a1892c1a16d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20Ka=CC=88mper?= Date: Fri, 4 Oct 2024 12:41:12 +0200 Subject: [PATCH 2/9] Update Ruby version in Circle CI config MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Stephan Kämper --- .circleci/config.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 4fc2c41..4486d23 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -3,7 +3,7 @@ jobs: test: working_directory: ~/eqn docker: - - image: circleci/ruby:2.6 + - image: circleci/ruby:3.3 environment: GEM_HOME: ~/eqn/vendor/bundle steps: @@ -12,7 +12,7 @@ jobs: key: dependency-cache-{{ checksum "eqn.gemspec" }} - run: name: bundle-install - command: bundle check || bundle install --jobs=4 --retry=3 + command: bundle check || bundle install --jobs=4 --retry=3 - run: name: appraisal-install command: bundle exec appraisal install @@ -29,7 +29,7 @@ jobs: - run: name: codeclimate command: bundle exec codeclimate-test-reporter - + workflows: version: 2 test: From f8c3fe3e0357bd1a61a5aaa39dd6de94f26cc366 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20K=C3=A4mper?= Date: Fri, 4 Oct 2024 12:46:42 +0200 Subject: [PATCH 3/9] Create GitHub action to run RSpec --- .github/workflows/ruby.yml | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/ruby.yml diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml new file mode 100644 index 0000000..08253fe --- /dev/null +++ b/.github/workflows/ruby.yml @@ -0,0 +1,38 @@ +# 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: Ruby - RSpec + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +permissions: + contents: read + +jobs: + test: + + runs-on: ubuntu-latest + strategy: + matrix: + ruby-version: ['2.6', '2.7', '3.0', '3.3'] + + steps: + - uses: actions/checkout@v4 + - name: Set up Ruby + # To automatically get bug fixes and new Ruby versions for ruby/setup-ruby, + # change this to (see https://github.com/ruby/setup-ruby#versioning): + # uses: ruby/setup-ruby@v1 + uses: ruby/setup-ruby@55283cc23133118229fd3f97f9336ee23a179fcf # v1.146.0 + with: + ruby-version: ${{ matrix.ruby-version }} + bundler-cache: true # runs 'bundle install' and caches installed gems automatically + - name: Run RSpec + run: bundle exec rspec From 12ac6170ebdf2188dfa825a7271e5288c28b1c36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20K=C3=A4mper?= Date: Fri, 4 Oct 2024 12:48:18 +0200 Subject: [PATCH 4/9] Runs GitHub action for rspec only for Ruby 3.0 & 3.3 --- .github/workflows/ruby.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 08253fe..9db3b58 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -22,7 +22,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - ruby-version: ['2.6', '2.7', '3.0', '3.3'] + ruby-version: ['3.0', '3.3'] steps: - uses: actions/checkout@v4 From 6642cc9bb3f5e3a9b4c1c4b9f0bb5fb7870c24c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20Ka=CC=88mper?= Date: Fri, 4 Oct 2024 12:55:03 +0200 Subject: [PATCH 5/9] =?UTF-8?q?Uses=20GitHub=20Ruby=20action=20=E2=80=99ru?= =?UTF-8?q?by/setup-ruby@v1=E2=80=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Stephan Kämper --- .github/workflows/ruby.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 9db3b58..1b64cc0 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -29,8 +29,8 @@ jobs: - name: Set up Ruby # To automatically get bug fixes and new Ruby versions for ruby/setup-ruby, # change this to (see https://github.com/ruby/setup-ruby#versioning): - # uses: ruby/setup-ruby@v1 - uses: ruby/setup-ruby@55283cc23133118229fd3f97f9336ee23a179fcf # v1.146.0 + uses: ruby/setup-ruby@v1 +# uses: ruby/setup-ruby@55283cc23133118229fd3f97f9336ee23a179fcf # v1.146.0 with: ruby-version: ${{ matrix.ruby-version }} bundler-cache: true # runs 'bundle install' and caches installed gems automatically From fdb9e0689911802d55e83ab6b4aa63f65af5d913 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20Ka=CC=88mper?= Date: Fri, 4 Oct 2024 12:57:03 +0200 Subject: [PATCH 6/9] Run GitHub action on pushes & pull requests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Stephan Kämper --- .github/workflows/ruby.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 1b64cc0..9c5997d 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -7,11 +7,7 @@ name: Ruby - RSpec -on: - push: - branches: [ "master" ] - pull_request: - branches: [ "master" ] +on: [push, pull_request] permissions: contents: read From a47e5b4c465ca615eeecb33b95fcaa4337712824 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20Ka=CC=88mper?= Date: Fri, 4 Oct 2024 12:58:16 +0200 Subject: [PATCH 7/9] Fixes issu in GitHub action config MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Stephan Kämper --- .github/workflows/ruby.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 9c5997d..f56b695 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -14,7 +14,6 @@ permissions: jobs: test: - runs-on: ubuntu-latest strategy: matrix: From c71a36db1b0cc2d209d8d32c595c90de1985ab07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20Ka=CC=88mper?= Date: Fri, 4 Oct 2024 13:03:29 +0200 Subject: [PATCH 8/9] Rewrites GitHub config MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Stephan Kämper --- .github/workflows/ruby.yml | 39 +++++++++++--------------------------- 1 file changed, 11 insertions(+), 28 deletions(-) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index f56b695..f086216 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -1,33 +1,16 @@ -# 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: Ruby RSpec -name: Ruby - RSpec - -on: [push, pull_request] - -permissions: - contents: read +on: [push,pull_request] jobs: - test: + build: runs-on: ubuntu-latest - strategy: - matrix: - ruby-version: ['3.0', '3.3'] - steps: - - uses: actions/checkout@v4 - - name: Set up Ruby - # To automatically get bug fixes and new Ruby versions for ruby/setup-ruby, - # change this to (see https://github.com/ruby/setup-ruby#versioning): - uses: ruby/setup-ruby@v1 -# uses: ruby/setup-ruby@55283cc23133118229fd3f97f9336ee23a179fcf # v1.146.0 - with: - ruby-version: ${{ matrix.ruby-version }} - bundler-cache: true # runs 'bundle install' and caches installed gems automatically - - name: Run RSpec - run: bundle exec rspec + - uses: actions/checkout@v3 + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: ['3.3.0', '3.3.5'] + bundler-cache: true + - name: Run the default task + run: bundle exec rspec From 3a532cfbec588b695b906873285a182c77d6c618 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20Ka=CC=88mper?= Date: Fri, 4 Oct 2024 13:06:00 +0200 Subject: [PATCH 9/9] Use only one Ruby version in GitHub action MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit …for the moment Signed-off-by: Stephan Kämper --- .github/workflows/ruby.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index f086216..5281fd4 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -10,7 +10,7 @@ jobs: - name: Set up Ruby uses: ruby/setup-ruby@v1 with: - ruby-version: ['3.3.0', '3.3.5'] + ruby-version: '3.3.5' bundler-cache: true - name: Run the default task run: bundle exec rspec