Skip to content

Commit

Permalink
Merge pull request #7 from payrollhero/ruby3
Browse files Browse the repository at this point in the history
ruby 3 support
  • Loading branch information
mathieujobin authored Dec 9, 2022
2 parents ce0a419 + 0857f25 commit e6a1463
Show file tree
Hide file tree
Showing 20 changed files with 752 additions and 304 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/rubocop-challenger.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: "RuboCop Challenge"

on:
schedule:
- cron: '30 23 * * 2,3,4' # この設定の場合、火水木のAM8:30に自動でPRが作られます。

jobs:
create-pr:
name: Create Pull Request
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Ruby 2.7
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7.6
- name: Install bundler
run: gem install bundler
- name: Install gems
run: bundle install --jobs 4 --retry 3
- name: Set git configuration
run: git config remote.origin.url "[email protected]:payrollhero/excel_templating.git" # プロジェクトごとに変わる値です。
- name: Create RuboCop challenge pull request
env:
GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: bundle exec rubocop_challenger go --base-branch=master [email protected] --name="Rubocop Challenger" --mode=random
50 changes: 50 additions & 0 deletions .github/workflows/test-suite.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby

name: test-suite

on: [push, pull_request]

jobs:
test:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
gemfile: ["rails-7.0.x"]
ruby: [3.2]
include:
- gemfile: rails-7.0.x
ruby: '3.1'
- gemfile: rails-7.0.x
ruby: '3.0'
- gemfile: rails-7.0.x
ruby: '2.7'
- gemfile: rails-6.1.x
ruby: '3.1'
- gemfile: rails-6.1.x
ruby: '3.0'
- gemfile: rails-6.1.x
ruby: 2.7
- gemfile: rails-6.1.x
ruby: 2.6
- gemfile: rails-6.0.x
ruby: 2.7
- gemfile: rails-6.0.x
ruby: 2.6
- gemfile: rails-5.2.x
ruby: 2.6

env:
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/Gemfile.${{ matrix.gemfile }}
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- run: bundle exec rake
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
Gemfile.lock
gemfiles/*.lock
coverage/
*.gem
doc/
pkg/
vendor/cache/*.gem
261 changes: 0 additions & 261 deletions .rubocop.hound.yml

This file was deleted.

31 changes: 4 additions & 27 deletions .rubocop.ph.yml
Original file line number Diff line number Diff line change
@@ -1,44 +1,21 @@
# Older version
Style/EmptyLinesAroundBody:
Layout/EmptyLinesAroundClassBody:
Enabled: false

# Newer version (3 for the 1 above)
Style/EmptyLinesAroundClassBody:
Layout/EmptyLinesAroundModuleBody:
Enabled: false

Style/EmptyLinesAroundModuleBody:
Layout/EmptyLinesAroundMethodBody:
Enabled: false

Style/EmptyLinesAroundMethodBody:
Enabled: false

# Other

Style/StringLiterals:
Enabled: false

Style/FileName:
Enabled: false

Style/RedundantException:
Enabled: false

Style/SignalException:
Enabled: false

# PH Coding Rules
Style/Blocks:
Enabled: false

Style/CollectionMethods:
PreferredMethods:
detect: find

# Github's PR width is 120 characters
Metrics/LineLength:
Layout/LineLength:
Max: 120
AllowURI: true

# Align with the style guide, we don't prefer anything
Style/CollectionMethods:
Enabled: false
Loading

0 comments on commit e6a1463

Please sign in to comment.