Skip to content

Commit

Permalink
Merge branch 'release/2.2.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
cmcfadden committed Oct 20, 2022
2 parents b693648 + 1da97f7 commit a30e5fc
Show file tree
Hide file tree
Showing 215 changed files with 10,982 additions and 2,322 deletions.
1 change: 1 addition & 0 deletions .browserslistrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
defaults
30 changes: 30 additions & 0 deletions .github/workflows/rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# https://github.com/rails/rails/blob/main/.github/workflows/rubocop.yml

name: RuboCop

on: [push, pull_request]

jobs:
build:
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
- name: Cache gems
uses: actions/cache@v1
with:
path: vendor/bundle
key: ${{ runner.os }}-rubocop-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-rubocop-
- name: Install gems
run: |
bundle config path vendor/bundle
bundle config set without 'default doc job cable storage ujs test db'
bundle install --jobs 4 --retry 3
- name: Run RuboCop
run: bundle exec rubocop --parallel
57 changes: 57 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: test

on:
push:
branches: [develop, main, master, "feature/**"]
pull_request:
branches: [develop, main, master, "feature/**"]

# Allows workflow manually from the Actions tab
workflow_dispatch:

jobs:
test:
runs-on: ubuntu-latest
services:
mysql:
image: mysql
env:
MYSQL_ROOT_PASSWORD: root
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
env:
DB_HOST: 127.0.0.1
DB_PORT: 3306
DB_USERNAME: root
DB_PASSWORD: root
RAILS_ENV: test
steps:
- name: Verify mysql connection
run: |
mysql --host ${{ ENV.DB_HOST }} --port ${{ ENV.DB_PORT }} -u${{ ENV.DB_USERNAME}} -p${{ ENV.DB_PASSWORD }} -e "SHOW DATABASES"
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Install dependencies
run: |
gem install bundler
bundle install
yarn install --frozen-lockfile
- name: Setup config files for CI
run: |
cp config/ldap_ci.yml config/ldap.yml
- name: Setup Database
run: |
cp config/database_ci.yml config/database.yml
./bin/rails db:create
./bin/rails db:migrate
- name: Run RSpec
run: bundle exec rspec
- name: Archive capybara artifacts
uses: actions/upload-artifact@v2
if: failure()
with:
name: capybara
path: tmp/capybara/
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,12 @@
config/ldap.yml
config/database.yml
config/secrets.yml

.env*
!.env.example
/public/packs
/public/packs-test
/node_modules
/yarn-error.log
yarn-debug.log*
.yarn-integrity
54 changes: 51 additions & 3 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,52 @@
inherit_from: ~/.rubocop.yml
inherit_from: .rubocop_todo.yml

Rails:
Enabled: true
require:
- rubocop-rspec
- rubocop-rails
- rubocop-rake
- rubocop-performance

AllCops:
NewCops: enable
Exclude:
- db/schema.rb # autogenerated
- vendor/**/* # not our code
- bin/**/* # autogenerated
- node_modules/**/*

Metrics/BlockLength:
Exclude:
- spec/**/*
- config/**/*
- db/migrate/*
- lib/tasks/**/*

# perceived complexity cop forces us to avoid inlining code,
# even though inlining code makes code easier to reason with
# and less error prone
Metrics/PerceivedComplexity:
Enabled: false

# cyclomatic complexity cop forces us to avoid inlining code, even though
# inlining code makes code easier to reason with and less error prone
Metrics/CyclomaticComplexity:
Enabled: false

Metrics/ClassLength:
Enabled: false

# explicit arguments are easier to understand / read without needing to read the docs
Style/RedundantArgument:
Enabled: false

# Tests are self-documenting
Style/Documentation:
Exclude:
- spec/**/*

# Multiple expects can make for faster E2E tests
RSpec/MultipleExpectations:
Enabled: false

Style/StringLiterals:
Enabled: false
Loading

0 comments on commit a30e5fc

Please sign in to comment.