Skip to content

Commit

Permalink
Merge branch 'main' into portabilis-patch-2024-12-24
Browse files Browse the repository at this point in the history
  • Loading branch information
AnaPerola committed Dec 24, 2024
2 parents 61c93a8 + 876f74e commit 3ee4624
Show file tree
Hide file tree
Showing 1,628 changed files with 29,881 additions and 22,719 deletions.
32 changes: 23 additions & 9 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,19 @@ name: Tests

on:
push:
branches: [ main ]
branches:
- main
- tc-gh-actions
pull_request:

jobs:
default:

name: Unit and Integration

if: "! github.event.pull_request.draft"

runs-on: ubuntu-latest
timeout-minutes: 10

env:
RAILS_ENV: test
Expand All @@ -24,7 +28,11 @@ jobs:
POSTGRES_DB: idiario_test
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 3
options:
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 3

redis:
image: redis
Expand All @@ -34,13 +42,13 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Setup Ruby and install gems
uses: ruby/setup-ruby@v1
with:
ruby-version: '2.4.10'
bundler: '1.17.3'
ruby-version: "2.6.6"
bundler: "2.4.22"
bundler-cache: true

- name: Configure database
Expand All @@ -51,11 +59,17 @@ jobs:
echo -e "
test:
secret_key_base: `bundle exec rake secret`
redis_url: redis://localhost:6379
REDIS_URL: 'redis://localhost:6379/'
REDIS_DB_CACHE: '0'
REDIS_DB_SESSION: '1'
REDIS_DB_SIDEKIQ: '2'
REDIS_MODE: 'standalone'
" > config/secrets.yml
- name: Migrate
run: RAILS_ENV=test bundle exec rake db:migrate
run: |
RAILS_ENV=test bundle exec rake db:migrate
- name: Tests
run: bundle exec rspec --exclude-pattern 'spec/acceptance/*.feature'
run: |
RAILS_ENV=test bundle exec rspec --exclude-pattern 'spec/acceptance/*.feature'
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
*.rbc
capybara-*.html
/log
/coverage
/tmp
/db/*.sqlite3
/public/system
Expand Down
13 changes: 12 additions & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
inherit_from: .rubocop_todo.yml

require: rubocop-rails

AllCops:
TargetRailsVersion: 4.2
TargetRailsVersion: 5.0
Exclude:
- 'bin/**/*'
- 'vendor/**/*'
- 'db/**/*'
- 'config/**/*'
- 'script/**/*'
- 'spec/rails_helper.rb'

Metrics/AbcSize:
Enabled: false
Expand Down
Loading

0 comments on commit 3ee4624

Please sign in to comment.