From b23c2385ae30a689b12012480145292fe81d7b5d Mon Sep 17 00:00:00 2001 From: Gabriel Arjones Date: Fri, 10 Feb 2023 17:45:35 -0300 Subject: [PATCH] run github workflows on ruby 3.0 --- .github/workflows/lint.yml | 10 ++++++++-- .github/workflows/test.yml | 10 +++++++++- Gemfile | 7 +++++-- autobuild.gemspec | 1 + test/packages/test_autotools.rb | 32 ++++++++++++++++---------------- 5 files changed, 39 insertions(+), 21 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 665569cf..e677a6b1 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -8,7 +8,11 @@ jobs: strategy: matrix: - ruby-version: ["2.7", "2.6", "2.5"] + ruby-version: + - "3.0" + - "2.7" + - "2.6" + - "2.5" steps: - uses: actions/checkout@v2 @@ -19,7 +23,9 @@ jobs: uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby-version }} + - name: Remove vscode gems + run: bundle config set --local without vscode - name: Install dependencies run: bundle install - name: Run rubocop - run: bundle exec rubocop \ No newline at end of file + run: bundle exec rubocop diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2e4e55c2..69192d1f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -8,7 +8,11 @@ jobs: strategy: matrix: - ruby-version: ["2.7", "2.6", "2.5"] + ruby-version: + - "3.0" + - "2.7" + - "2.6" + - "2.5" steps: - uses: actions/checkout@v2 @@ -19,8 +23,12 @@ jobs: uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby-version }} + - name: Remove vscode gems + run: bundle config set --local without vscode - name: Install dependencies run: bundle install + - name: Enable file transport in git + run: git config --global protocol.file.allow always - name: Run tests run: bundle exec rake test env: diff --git a/Gemfile b/Gemfile index 18112f58..fd8dfa70 100644 --- a/Gemfile +++ b/Gemfile @@ -2,12 +2,15 @@ source 'https://rubygems.org' gemspec +group :lint do + gem 'rubocop', '>= 0.6.0' + gem 'rubocop-rock' +end + group :vscode do gem 'debase', '>= 0.2.2.beta10' gem 'pry' gem 'pry-byebug' - gem 'rubocop', '>= 0.6.0' - gem 'rubocop-rock' gem 'ruby-debug-ide', '>= 0.6.0' gem 'solargraph' end diff --git a/autobuild.gemspec b/autobuild.gemspec index e24e9081..2ace1ca3 100644 --- a/autobuild.gemspec +++ b/autobuild.gemspec @@ -35,4 +35,5 @@ Gem::Specification.new do |s| s.add_development_dependency "minitest", "~> 5.0", ">= 5.0" s.add_development_dependency "simplecov" s.add_development_dependency "timecop" + s.add_development_dependency "webrick" end diff --git a/test/packages/test_autotools.rb b/test/packages/test_autotools.rb index d948afe6..8393b3d3 100644 --- a/test/packages/test_autotools.rb +++ b/test/packages/test_autotools.rb @@ -231,8 +231,8 @@ def touch_in_srcdir(*dirs, file) working_directory: @package.srcdir).once.globally.ordered @package.should_receive(:run).with(any, "/my/autogen/script", working_directory: @package.srcdir).once.globally.ordered - @package.should_receive(:run).with(any, /configure/, any, any). - once.globally.ordered + @package.should_receive(:run).with(any, /configure/, any, + working_directory: @package.builddir).once.globally.ordered conffile = @package.prepare Rake::Task[conffile].invoke end @@ -247,8 +247,8 @@ def touch_in_srcdir(*dirs, file) working_directory: @package.srcdir).once.globally.ordered @package.should_receive(:run).with(any, "/my/autogen/script", working_directory: @package.srcdir).once.globally.ordered - @package.should_receive(:run).with(any, /configure/, any, any). - once.globally.ordered + @package.should_receive(:run).with(any, /configure/, any, + working_directory: @package.builddir).once.globally.ordered conffile = @package.prepare Rake::Task[conffile].invoke end @@ -269,8 +269,8 @@ def touch_in_srcdir(*dirs, file) working_directory: @package.srcdir).once.globally.ordered @package.should_receive(:run).with(any, /automake/, working_directory: @package.srcdir).once.globally.ordered - @package.should_receive(:run).with(any, /configure/, any, any). - once.globally.ordered + @package.should_receive(:run).with(any, /configure/, any, + working_directory: @package.builddir).once.globally.ordered conffile = @package.prepare Rake::Task[conffile].invoke end @@ -315,8 +315,8 @@ def touch_in_srcdir(*dirs, file) working_directory: @package.srcdir).once.globally.ordered @package.should_receive(:run).with(any, /automake/, working_directory: @package.srcdir).once.globally.ordered - @package.should_receive(:run).with(any, /configure/, any, any). - once.globally.ordered + @package.should_receive(:run).with(any, /configure/, any, + working_directory: @package.builddir).once.globally.ordered conffile = @package.prepare Rake::Task[conffile].invoke end @@ -335,8 +335,8 @@ def touch_in_srcdir(*dirs, file) working_directory: @package.srcdir).once.globally.ordered @package.should_receive(:run).with(any, /automake/, working_directory: @package.srcdir).once.globally.ordered - @package.should_receive(:run).with(any, /configure/, any, any). - once.globally.ordered + @package.should_receive(:run).with(any, /configure/, any, + working_directory: @package.builddir).once.globally.ordered conffile = @package.prepare Rake::Task[conffile].invoke end @@ -355,8 +355,8 @@ def touch_in_srcdir(*dirs, file) working_directory: @package.srcdir).once.globally.ordered @package.should_receive(:run).with(any, /automake/, working_directory: @package.srcdir).once.globally.ordered - @package.should_receive(:run).with(any, /configure/, any, any). - once.globally.ordered + @package.should_receive(:run).with(any, /configure/, any, + working_directory: @package.builddir).once.globally.ordered conffile = @package.prepare Rake::Task[conffile].invoke end @@ -375,8 +375,8 @@ def touch_in_srcdir(*dirs, file) working_directory: @package.srcdir).once.globally.ordered @package.should_receive(:run).with(any, /automake/, working_directory: @package.srcdir).once.globally.ordered - @package.should_receive(:run).with(any, /configure/, any, any). - once.globally.ordered + @package.should_receive(:run).with(any, /configure/, any, + working_directory: @package.builddir).once.globally.ordered conffile = @package.prepare Rake::Task[conffile].invoke end @@ -395,8 +395,8 @@ def touch_in_srcdir(*dirs, file) working_directory: @package.srcdir).once.globally.ordered @package.should_receive(:run).with(any, /autoheader/, working_directory: @package.srcdir).once.globally.ordered - @package.should_receive(:run).with(any, /configure/, any, any). - once.globally.ordered + @package.should_receive(:run).with(any, /configure/, any, + working_directory: @package.builddir).once.globally.ordered conffile = @package.prepare Rake::Task[conffile].invoke end