-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #86 from ryanckulp/github_ci
stub github actions CI
- Loading branch information
Showing
22 changed files
with
328 additions
and
113 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,10 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" | ||
- package-ecosystem: "bundler" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" |
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,52 @@ | ||
name: Tests | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- '*' | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
services: | ||
postgres: | ||
image: postgres:latest | ||
env: | ||
POSTGRES_USER: postgres | ||
POSTGRES_PASSWORD: password | ||
ports: ['5432:5432'] | ||
redis: | ||
image: redis | ||
ports: ['6379:6379'] | ||
options: --entrypoint redis-server | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Setup Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
bundler: default | ||
bundler-cache: true | ||
|
||
- name: Precompile assets | ||
run: RAILS_ENV=test bundle exec rake assets:precompile | ||
|
||
- name: Use sample application.yml file | ||
run: mv config/application-sample.yml config/application.yml | ||
|
||
- name: Rubocop Check | ||
run: bundle exec rubocop | ||
|
||
- name: Run tests | ||
env: | ||
DATABASE_URL: postgres://postgres:password@localhost:5432/test | ||
REDIS_URL: redis://localhost:6379/0 | ||
RAILS_ENV: test | ||
PG_USER: postgres | ||
run: | | ||
bundle exec rails db:drop db:create db:schema:load RAILS_ENV=test | ||
bundle exec rspec spec/ |
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,98 @@ | ||
inherit_mode: | ||
merge: | ||
- Exclude | ||
|
||
AllCops: | ||
TargetRubyVersion: 3.2 | ||
DisplayCopNames: true | ||
Exclude: | ||
- bin/* | ||
- tmp/**/* | ||
- db/schema.rb | ||
- vendor/*/** | ||
SuggestExtensions: | ||
rubocop-capybara: true | ||
rubocop-factory_bot: true | ||
rubocop-rails: true | ||
rubocop-rspec: true | ||
|
||
|
||
Layout/EmptyLinesAroundClassBody: | ||
Enabled: false | ||
|
||
Layout/HashAlignment: | ||
Enabled: true | ||
|
||
Lint/ConstantDefinitionInBlock: | ||
Enabled: false | ||
|
||
Metrics/ClassLength: | ||
Enabled: false | ||
|
||
Naming/VariableNumber: | ||
Enabled: false | ||
|
||
Naming/MemoizedInstanceVariableName: | ||
Enabled: false | ||
|
||
Style/ClassAndModuleChildren: | ||
Enabled: false | ||
|
||
Style/Documentation: | ||
Enabled: false | ||
|
||
Style/GuardClause: | ||
Enabled: false | ||
|
||
Style/HashSyntax: | ||
Enabled: false | ||
|
||
Style/IfUnlessModifier: | ||
Enabled: false | ||
|
||
Style/NumericLiterals: | ||
Enabled: false | ||
|
||
Style/RedundantFreeze: | ||
Enabled: false | ||
|
||
Style/RedundantSelf: | ||
Enabled: false | ||
|
||
Style/StringLiterals: | ||
Enabled: false | ||
|
||
Style/SymbolArray: | ||
Enabled: false | ||
|
||
Style/WordArray: | ||
Enabled: false | ||
|
||
Style/FrozenStringLiteralComment: | ||
Enabled: false | ||
|
||
Metrics/CyclomaticComplexity: | ||
Max: 20 | ||
|
||
Metrics/MethodLength: | ||
Max: 60 | ||
|
||
Metrics/BlockLength: | ||
Enabled: false | ||
|
||
Metrics/AbcSize: | ||
Max: 50 | ||
|
||
Metrics/PerceivedComplexity: | ||
Max: 20 | ||
|
||
Layout/LineLength: | ||
Severity: warning | ||
Max: 250 | ||
|
||
Layout/FirstHashElementIndentation: | ||
EnforcedStyle: consistent | ||
|
||
# Global variable is the only way to subscribe for more tickers in the websocket connection between Rails <-> Polygon | ||
Style/GlobalVars: | ||
Enabled: false |
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
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
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
Oops, something went wrong.