Skip to content

Commit

Permalink
Replace CI with GitHub Actions (#8)
Browse files Browse the repository at this point in the history
Signed-off-by: Takuya Noguchi <[email protected]>
  • Loading branch information
tnir authored Aug 1, 2022
1 parent 9b0427c commit 90cfb0e
Show file tree
Hide file tree
Showing 3 changed files with 94 additions and 23 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
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
continue-on-error: ${{ matrix.unsupported }} # Only for Ruby 2.4

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
34 changes: 34 additions & 0 deletions .github/workflows/jruby.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# We do not have plan to support
name: JRuby

on:
push:
branches: [ "master" ]

permissions:
contents: read

jobs:
test:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
ruby-version: [jruby-9.2.9.0, jruby-head]
continue-on-error: 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
- name: Run tests
run: bundle exec rake test
continue-on-error: true
- name: Run man tests
run: bundle exec rake man
continue-on-error: true
23 changes: 0 additions & 23 deletions .travis.yml

This file was deleted.

0 comments on commit 90cfb0e

Please sign in to comment.