Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable GitHub Actions with updated Rubocop and Danger #2143

Merged
merged 1 commit into from
Dec 29, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .github/workflows/danger.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: Danger
on:
pull_request:
ypes: [opened, reopened, edited, synchronize]
jobs:
danger:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v1
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6
bundler-cache: true
- name: Run Danger
run: bundle exec danger
env:
DANGER_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
80 changes: 80 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
---
name: test
on:
push:
branches:
- "*"
pull_request:
branches:
- "*"
jobs:
lint:
name: RuboCop
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
bundler-cache: true
- name: Run RuboCop
run: bundle exec rubocop
test:
strategy:
fail-fast: false
matrix:
ruby:
- 2.5
- 2.6
- 2.7
gemfile:
- Gemfile
- gemfiles/rack1.gemfile
- gemfiles/rack2.gemfile
- gemfiles/rack_edge.gemfile
- gemfiles/rails_edge.gemfile
- gemfiles/rails_5.gemfile
- gemfiles/rails_6.gemfile
experimental: [false]
include:
- ruby: 2.7
gemfile: 'gemfiles/multi_json.gemfile'
experimental: false
- ruby: 2.7
gemfile: 'gemfiles/multi_xml.gemfile'
experimental: false
- ruby: "ruby-head"
experimental: true
- ruby: "truffleruby-head"
experimental: true
- ruby: "jruby-head"
experimental: true
runs-on: ubuntu-20.04
continue-on-error: ${{ matrix.experimental }}
env:
BUNDLE_GEMFILE: ${{ matrix.gemfile }}

steps:
- uses: actions/checkout@v2

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true

- name: Run tests
run: bundle exec rake spec

- name: Run tests (spec/integration/eager_load)
if: ${{ matrix.gemfile == 'Gemfile' }}
run: bundle exec rspec spec/integration/eager_load

- name: Run tests (spec/integration/multi_json)
if: ${{ matrix.gemfile == 'gemfiles/multi_json.gemfile' }}
run: bundle exec rspec spec/integration/multi_json

- name: Run tests (spec/integration/multi_xml)
if: ${{ matrix.gemfile == 'gemfiles/multi_xml.gemfile' }}
run: bundle exec rspec spec/integration/multi_xml
1 change: 1 addition & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
AllCops:
NewCops: enable
TargetRubyVersion: 2.4
SuggestExtensions: false
Exclude:
- vendor/**/*
- bin/**/*
Expand Down
Loading