Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into HEAD
Browse files Browse the repository at this point in the history
  • Loading branch information
mathieujobin committed Jan 2, 2023
2 parents 47bc73e + 5eced26 commit f1c2387
Show file tree
Hide file tree
Showing 100 changed files with 5,069 additions and 1,605 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 @@
# 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: build

on: [push, pull_request]

jobs:
test:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
ruby:
- 2.6
- 2.7
- '3.0'
- 3.1
gemfile:
- Gemfile.rails50
- Gemfile.rails51
- Gemfile.rails52 # Min ruby 2.2.2
- Gemfile.rails60 # Min ruby 2.5.0
- Gemfile.rails61 # Min ruby 2.5.0
- Gemfile.rails70 # Min ruby 2.7.0
exclude:
- gemfile: Gemfile.rails50
ruby: 2.7
- gemfile: Gemfile.rails50
ruby: '3.0'
- gemfile: Gemfile.rails50
ruby: 3.1
- gemfile: Gemfile.rails51
ruby: 2.7
- gemfile: Gemfile.rails51
ruby: '3.0'
- gemfile: Gemfile.rails51
ruby: 3.1
- gemfile: Gemfile.rails52
ruby: 2.7
- gemfile: Gemfile.rails52
ruby: '3.0'
- gemfile: Gemfile.rails52
ruby: 3.1
- gemfile: Gemfile.rails70
ruby: 2.6

env:
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- run: bundle exec rspec
28 changes: 28 additions & 0 deletions .github/workflows/rubocop-challenger.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: "RuboCop Challenge"

on:
schedule:
- cron: '30 23 * * 1,3,5' # Monday, Wednesday, Friday at 23:30 UTC

jobs:
create-pr:
name: Create Pull Request
runs-on: ubuntu-latest
env:
BUNDLE_GEMFILE: gemfiles/Gemfile.rails50
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]:Apipie/apipie-rails.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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.bundle/
log/*.log
pkg/
coverage
spec/dummy/db/*.sqlite3
spec/dummy/log/*.log
spec/dummy/tmp/
Expand All @@ -12,3 +13,4 @@ Gemfile.local
.ruby-gemset

.DS_Store
rel-eng/.ipynb_checkpoints
37 changes: 37 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
require:
- rubocop-rails
- rubocop-rspec
- rubocop-performance

inherit_from: .rubocop_todo.yml

Rails:
Enabled: true

AllCops:
NewCops: enable

Layout/LineLength:
Max: 140
Exclude:
- app/controllers/apipie/apipies_controller.rb
- lib/apipie/extractor/writer.rb
- lib/apipie/param_description.rb
- lib/apipie/response_description_adapter.rb
- lib/apipie/swagger_generator.rb
- lib/apipie/errors.rb
- lib/apipie/rspec/response_validation_helper.rb
- spec/controllers/users_controller_spec.rb
- spec/dummy/app/controllers/twitter_example_controller.rb
- spec/dummy/config/initializers/secret_token.rb
- spec/lib/application_spec.rb
- spec/lib/param_description_spec.rb
- spec/lib/swagger/response_validation_spec.rb
- spec/spec_helper.rb

Naming/PredicateName:
AllowedMethods:
- have_field?

Style/NumericPredicate:
Enabled: false
Loading

0 comments on commit f1c2387

Please sign in to comment.