Skip to content

Commit

Permalink
Merge pull request #1471 from geeksforsocialchange/1456/format-ruby-w…
Browse files Browse the repository at this point in the history
…ith-rubocop

Format Ruby with Rubocop
  • Loading branch information
erbridge authored Oct 18, 2022
2 parents 103ab94 + 7edd930 commit fe3adf9
Show file tree
Hide file tree
Showing 297 changed files with 3,105 additions and 1,924 deletions.
20 changes: 13 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Build, Test and Optionally Deploy

on: [push, pull_request, workflow_dispatch]
on:
- push
- workflow_dispatch

# According to: https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu2004-README.md
# Both Node and Yarn should be installed already
Expand Down Expand Up @@ -63,12 +64,17 @@ jobs:
yarn install --immutable
env:
NODE_ENV: test
- name: Do Tests
- name: Run unit tests
run: |
yarn build
bundle exec rails test
bundle exec rails test:system
bin/test --unit --no-fix
env:
POSTGRES_USER: postgres
POSTGRES_HOST: localhost
POSTGRES_PORT: 5432
PGPASSWORD: foobar
- name: Run system tests
run: |
bin/test --system --no-lint
env:
POSTGRES_USER: postgres
POSTGRES_HOST: localhost
Expand Down
4 changes: 4 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/app/assets/builds/
/doc/**/*.html
/doc/**/*.css
/doc/**/*.js
/tmp/
/vendor/bundle/
/.rubocop_todo.yml
27 changes: 27 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
inherit_from: .rubocop_todo.yml

require:
- rubocop-graphql
- rubocop-minitest
- rubocop-performance
- rubocop-rails
- rubocop-rake

AllCops:
NewCops: enable

GraphQL/FieldName:
Enabled: false

GraphQL/ObjectDescription:
Enabled: false

Rails/DynamicFindBy:
AllowedMethods:
- find_by_day
- find_by_request
- find_by_sql
- find_by_week

Style/Documentation:
Enabled: false
Loading

0 comments on commit fe3adf9

Please sign in to comment.