summaryrefslogtreecommitdiff
path: root/.github/workflows/main.yml
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows/main.yml')
-rw-r--r--.github/workflows/main.yml50
1 files changed, 32 insertions, 18 deletions
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 014f927..3ddc090 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -1,63 +1,77 @@
-name: Ruby
+name: CI
on:
push:
- branches: [ master ]
+ branches:
+ - master
pull_request:
- branches: [ master ]
+ branches:
+ - master
jobs:
danger:
runs-on: ubuntu-latest
- if: github.event_name == 'pull_request'
+ if: ${{ github.event_name == 'pull_request' }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-ruby@v1
with:
- ruby-version: '2.7'
+ ruby-version: 2.7
- uses: MeilCli/danger-action@v5
with:
- plugins_file: 'Gemfile'
- install_path: 'vendor/bundle'
- danger_file: 'Dangerfile'
- danger_id: 'danger-pr'
+ danger_file: Dangerfile
+ danger_id: danger-pr
+ install_path: vendor/bundle
+ plugins_file: Gemfile
env:
DANGER_GITHUB_API_TOKEN: ${{ secrets.github_token }}
+
test:
- runs-on: ubuntu-18.04
+ runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
- ruby: [2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7, head, debug, truffleruby, truffleruby-head]
+ ruby:
+ - 2.7
+ - 2.6
+ - 2.5
+ - 2.4
+ - 2.3
+ - 2.2
+ - 2.1
steps:
- uses: actions/checkout@v2
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
- ruby-version: ${{ matrix.ruby }}
bundler-cache: true
+ ruby-version: ${{ matrix.ruby }}
- name: Install dependencies
- run: bundle install
+ run: bundle install --jobs 4 --retry 3
- name: Run tests
run: bundle exec rake
+
test-jruby:
- runs-on: ubuntu-18.04
+ runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
- os: [ubuntu, macos]
- jruby: [jruby, jruby-head]
+ os:
+ - macos
+ - ubuntu
+ jruby:
+ - jruby
steps:
- uses: actions/checkout@v2
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
- ruby-version: ${{ matrix.jruby }}
bundler-cache: true
+ ruby-version: ${{ matrix.jruby }}
- name: Install dependencies
env:
JRUBY_OPTS: --debug
- run: bundle install
+ run: bundle install --jobs 4 --retry 3
- name: Run tests
env:
JRUBY_OPTS: --debug