diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..2de65ee --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,31 @@ +name: Test + +on: [push, pull_request] + +jobs: + build: + runs-on: ubuntu-20.04 + + strategy: + fail-fast: false + + matrix: + ruby: [2.6.8, jruby-head, jruby-9.3.1.0] + + steps: + - uses: actions/checkout@v2 + + - name: Set up Ruby ${{ matrix.ruby }} + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby }} + bundler-cache: true + + - name: Set up Java 8 + uses: actions/setup-java@v2 + with: + distribution: zulu + java-version: 8 + + - name: Run test + run: bundle exec rake diff --git a/.gitignore b/.gitignore index f146c2c..a1e6142 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ pkg pom*xml +pom*xml.bkp *.gem *.lock diff --git a/.mvn/extensions.xml b/.mvn/extensions.xml index f6a83ff..4fba39b 100644 --- a/.mvn/extensions.xml +++ b/.mvn/extensions.xml @@ -1,14 +1,13 @@ - org.torquebox.mojo mavengem-wagon - 0.2.1 + 1.0.3 io.takari.polyglot polyglot-ruby - 0.1.18 + 0.4.4 diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index a0922fb..0000000 --- a/.travis.yml +++ /dev/null @@ -1,7 +0,0 @@ -language: ruby -sudo: false -rvm: - - 2.2.2 - - jruby - - jruby-head - diff --git a/Mavenfile b/Mavenfile index 1dbff6e..0a8107f 100644 --- a/Mavenfile +++ b/Mavenfile @@ -2,7 +2,7 @@ gemspec -properties 'push.skip': true, 'jruby.version': '9.2.9.0' +properties 'push.skip': true, 'jruby.version': '9.3.1.0' profile :id => :release do properties 'maven.test.skip' => true, 'invoker.skip' => true diff --git a/spec/maven_ruby_maven_spec.rb b/spec/maven_ruby_maven_spec.rb index 81cb359..90150d7 100644 --- a/spec/maven_ruby_maven_spec.rb +++ b/spec/maven_ruby_maven_spec.rb @@ -10,14 +10,14 @@ subject.exec( '-Dverbose', 'validate' ) end subject.verbose = false - CatchStdout.result.must_match /mvn -Dverbose validate/ + _(CatchStdout.result).must_match /mvn -Dverbose validate/ end it 'takes declared jruby version' do begin subject.inherit_jruby_version '9.0.4.0' subject.exec( '-X', 'initialize', '-l', 'pkg/log1.txt' ) - File.read('pkg/log1.txt').must_match /resolve jruby for version 9.0.4.0/ + _(File.read('pkg/log1.txt')).must_match /resolve jruby for version 9.0.4.0/ ensure subject['jruby.version'] = nil end @@ -27,13 +27,13 @@ it 'inherits jruby version' do subject.inherit_jruby_version subject.exec( '-X', 'initialize', '-l', 'pkg/log2.txt' ) - File.read('pkg/log2.txt').must_match /resolve jruby for version #{JRUBY_VERSION}/ + _(File.read('pkg/log2.txt')).must_match /resolve jruby for version #{JRUBY_VERSION}/ end else it 'takes default jruby version with inherit jruby version' do subject.inherit_jruby_version subject.exec( '-X', 'initialize', '-l', 'pkg/log3.txt' ) - File.read('pkg/log3.txt').must_match /resolve jruby for version 1.7.22/ + _(File.read('pkg/log3.txt')).must_match /resolve jruby for version 9.3.1.0/ end end end diff --git a/spec/ruby_maven_spec.rb b/spec/ruby_maven_spec.rb index 2d13e3a..da34c12 100644 --- a/spec/ruby_maven_spec.rb +++ b/spec/ruby_maven_spec.rb @@ -10,9 +10,9 @@ CatchStdout.exec do RubyMaven.exec( '--version' ) end - CatchStdout.result.must_match /Polyglot Maven Extension 0.1.15/ + _(CatchStdout.result).must_match /Polyglot Maven Extension 0.4.4/ xml = File.read('.mvn/extensions.xml') - xml.must_equal "dummy\n" + _(xml).must_equal "dummy\n" end end @@ -26,13 +26,13 @@ FileUtils.rm_f gem_name CatchStdout.exec do # need newer jruby version - RubyMaven.exec( '-Dverbose', 'package', '-Djruby.version=1.7.24' ) + RubyMaven.exec( '-Dverbose', 'package', '-Djruby.version=9.3.0.0' ) end #puts CatchStdout.result - CatchStdout.result.must_match /mvn -Dverbose package/ - File.exists?( gem_name ).must_equal true - File.exists?( '.mvn/extensions.xml' ).must_equal true - File.exists?( '.mvn/extensions.xml.orig' ).wont_equal true + _(CatchStdout.result).must_match /mvn -Dverbose package/ + _(File.exists?( gem_name )).must_equal true + _(File.exists?( '.mvn/extensions.xml' )).must_equal true + _(File.exists?( '.mvn/extensions.xml.orig' )).wont_equal true end end