-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
215 changed files
with
10,982 additions
and
2,322 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
defaults |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Oops, something went wrong.