Skip to content

Commit

Permalink
Replace CI with GitHub Actions
Browse files Browse the repository at this point in the history
    strategy:
      matrix:
        ruby-version: ['2.7', '3.0', '3.1', head]
        include:
          - ruby-version: ['2.4', '2.5', '2.6', jruby-9.2.7.0, jruby-head]

Signed-off-by: Takuya Noguchi <[email protected]>
  • Loading branch information
tnir committed Aug 1, 2022
1 parent 9b0427c commit 79950a2
Show file tree
Hide file tree
Showing 3 changed files with 90 additions and 23 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -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/[email protected]
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/[email protected]
with:
ruby-version: 2.7.6
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Run RuboCop
run: bundle exec rubocop
31 changes: 31 additions & 0 deletions .github/workflows/jruby.yml
Original file line number Diff line number Diff line change
@@ -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/[email protected]
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
23 changes: 0 additions & 23 deletions .travis.yml

This file was deleted.

0 comments on commit 79950a2

Please sign in to comment.