diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..beba992 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,59 @@ +name: Ruby + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +permissions: + contents: read + +jobs: + test: + runs-on: ubuntu-20.04 + continue-on-error: ${{ matrix.unsupported }} + strategy: + fail-fast: false + matrix: + ruby-version: ['2.7', '3.0'] + unsupported: [false] + include: + - ruby-version: '2.4' + unsupported: true + - ruby-version: '2.5' + unsupported: true + - ruby-version: '2.6' + unsupported: true + - ruby-version: '3.1' + unsupported: true + - ruby-version: head + unsupported: true + + steps: + - uses: actions/checkout@v3 + - name: Remove Gemfile.lock + run: rm -f Gemfile.lock + - name: Set up Ruby + uses: ruby/setup-ruby@v1.113.3 + with: + ruby-version: ${{ matrix.ruby-version }} + bundler-cache: true # runs 'bundle install' and caches installed gems automatically + continue-on-error: ${{ matrix.unsupported }} # Only for Ruby 2.4 + - name: Run tests + run: bundle exec rake test + continue-on-error: ${{ matrix.unsupported }} + - name: Run man tests + run: bundle exec rake man + + rubocop: + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v3 + - name: Set up Ruby + uses: ruby/setup-ruby@v1.113.3 + with: + ruby-version: 2.7.6 + bundler-cache: true # runs 'bundle install' and caches installed gems automatically + - name: Run RuboCop + run: bundle exec rubocop diff --git a/.github/workflows/jruby.yml b/.github/workflows/jruby.yml new file mode 100644 index 0000000..52a0585 --- /dev/null +++ b/.github/workflows/jruby.yml @@ -0,0 +1,31 @@ +# We do not have plan to support +name: JRuby + +on: + push: + branches: [ "master" ] + +permissions: + contents: read + +jobs: + test: + runs-on: ubuntu-20.04 + continue-on-error: ${{ matrix.unsupported }} + strategy: + fail-fast: false + matrix: + ruby-version: [jruby-9.2.9.0, jruby-head] + unsupported: [true] + + steps: + - uses: actions/checkout@v3 + - name: Set up Ruby + uses: ruby/setup-ruby@v1.113.3 + with: + ruby-version: ${{ matrix.ruby-version }} + bundler-cache: true # runs 'bundle install' and caches installed gems automatically + - name: Run tests + run: bundle exec rake test + - name: Run man tests + run: bundle exec rake man diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 7abb913..0000000 --- a/.travis.yml +++ /dev/null @@ -1,23 +0,0 @@ -language: ruby - -matrix: - allow_failures: - - rvm: jruby-9.2.7.0 - -rvm: - - 2.4 - - 2.5 - - 2.6 - - 2.7 - - jruby-9.2.7.0 - -before_install: - - gem install bundler:2.1.4 - -install: - - bundle install --with development - -script: - - bundle exec rubocop - - bundle exec rake test - - bundle exec rake man