This repository has been archived by the owner on Sep 2, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
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
160 changed files
with
5,608 additions
and
186 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,4 @@ | ||
SITE_NAME="ELDAC" | ||
USER_AGENT="ELDAC/1.0 (https://eldac.io)" | ||
HOST_THROTTLE_SECONDS=1 | ||
HOST_RULE_DEFAULT="deny" |
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,78 @@ | ||
name: "Ruby on Rails CI" | ||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
services: | ||
postgres: | ||
image: postgres:14-alpine | ||
ports: | ||
- "5432:5432" | ||
env: | ||
POSTGRES_DB: rails_test | ||
POSTGRES_USER: rails | ||
POSTGRES_PASSWORD: password | ||
env: | ||
RAILS_ENV: test | ||
DATABASE_URL: "postgres://rails:password@localhost:5432/rails_test" | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install chrome | ||
uses: browser-actions/setup-chrome@latest | ||
- run: chrome --version | ||
|
||
- name: Install xvfb | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install xvfb | ||
- name: Install Ruby and gems | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
bundler-cache: true | ||
|
||
- name: Set up database schema | ||
run: bin/rails db:schema:load | ||
|
||
- name: Run tests | ||
run: xvfb-run --auto-servernum bundle exec rspec | ||
|
||
- name: Upload coverage reports to Codecov | ||
uses: codecov/codecov-action@v3 | ||
env: | ||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | ||
with: | ||
files: ./coverage/.resultset.json | ||
|
||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
- name: Install Ruby and gems | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
bundler-cache: true | ||
|
||
- name: Setup Bundle Audit | ||
run: gem install bundle-audit | ||
- name: Security audit dependencies | ||
run: bundle exec bundle audit check --update | ||
continue-on-error: true | ||
|
||
- name: Setup Brakeman | ||
run: gem install brakeman | ||
- name: Security audit application code | ||
run: bundle exec brakeman -q -w2 | ||
continue-on-error: true | ||
|
||
- name: Setup Rubocop | ||
run: gem install rubocop | ||
- name: Lint Ruby files | ||
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
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,2 @@ | ||
--require spec_helper | ||
--color |
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,13 @@ | ||
require: | ||
- rubocop-rake | ||
- rubocop-rails | ||
- rubocop-rspec | ||
- rubocop-capybara | ||
- rubocop-factory_bot | ||
|
||
AllCops: | ||
NewCops: enable | ||
Style/Documentation: | ||
Enabled: false | ||
# RSpec/ExampleLength: | ||
# Max: 7 |
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.