Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 21 additions & 12 deletions .github/workflows/ci_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@ name: "[CI/CD]"
on: [push]

env:
NODE_VERSION: 16.9.1
RUBY_VERSION: 3.0.2
NODE_VERSION: 22.14.0
RUBY_VERSION: 3.3.4
DISABLE_SPRING: 1

jobs:
lints:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2.0.0
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: ruby/setup-ruby@v1
Expand All @@ -25,10 +26,10 @@ jobs:
- run: bundle exec erblint app/**/*.erb
name: Lint ERB files
tests:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
services:
postgres:
image: postgres:11
image: postgres:14
ports: ["5432:5432"]
options: >-
--health-cmd pg_isready
Expand All @@ -42,7 +43,7 @@ jobs:
DATABASE_PASSWORD: postgres
DATABASE_HOST: localhost
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: ruby/setup-ruby@v1
Expand All @@ -51,20 +52,24 @@ jobs:
bundler-cache: true
- name: Setup test_app
run: bundle exec rake test_app
- run: |
rm -f ./spec/decidim_dummy_app/app/services/dummy_signature_handler.rb
rm -f ./spec/decidim_dummy_app/app/services/dummy_sms_mobile_phone_validator.rb
name: Remove Initiative-dependent dummy files
- name: Rspec unit tests
run: bundle exec rspec --exclude-pattern "spec/system/**/*_spec.rb"
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
- uses: actions/upload-artifact@v2-preview
- uses: actions/upload-artifact@v4
if: always()
with:
name: screenshots
path: ./spec/decidim_dummy_app/tmp/screenshots
system_tests:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
services:
postgres:
image: postgres:11
image: postgres:14
ports: ["5432:5432"]
options: >-
--health-cmd pg_isready
Expand All @@ -78,7 +83,7 @@ jobs:
DATABASE_PASSWORD: postgres
DATABASE_HOST: localhost
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: ruby/setup-ruby@v1
Expand All @@ -87,11 +92,15 @@ jobs:
bundler-cache: true
- name: Setup test_app
run: bundle exec rake test_app
- run: |
rm -f ./spec/decidim_dummy_app/app/services/dummy_signature_handler.rb
rm -f ./spec/decidim_dummy_app/app/services/dummy_sms_mobile_phone_validator.rb
name: Remove Initiative-dependent dummy files
- name: Rspec system tests
run: bundle exec rspec --pattern "spec/system/**/*_spec.rb"
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
- uses: actions/upload-artifact@v2-preview
- uses: actions/upload-artifact@v4
if: always()
with:
name: screenshots
Expand Down
7 changes: 6 additions & 1 deletion .rubocop_ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ AllCops:
# If a value is specified for TargetRubyVersion then it is used.
# Else if .ruby-version exists and it contains an MRI version it is used.
# Otherwise we fallback to the oldest officially supported Ruby version (2.0).
TargetRubyVersion: 2.7
TargetRubyVersion: 3.3

RSpec:
Patterns:
Expand Down Expand Up @@ -1248,6 +1248,7 @@ RSpec/DescribeClass:
- spec/i18n_spec.rb
- "**/*/spec/**/*_badge_spec.rb"
- "**/tasks/**/*"
- spec/system/*

RSpec/ExampleLength:
Max: 49
Expand Down Expand Up @@ -1278,6 +1279,7 @@ RSpec/RepeatedExampleGroupDescription:

RSpec/RepeatedExampleGroupBody:
Enabled: false

RSpec/VerifiedDoubles:
Enabled: false

Expand All @@ -1287,6 +1289,9 @@ RSpec/LeakyConstantDeclaration:
RSpec/DescribedClass:
Enabled: false

RSpec/IndexedLet:
Enabled: false

# This is the default configuration file.

Faker/DeprecatedArguments:
Expand Down
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.0.2
3.3.4
14 changes: 7 additions & 7 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,21 @@ gem "decidim", DECIDIM_VERSION
gem "decidim-budgets_paper_ballots", path: "."

gem "bootsnap", "~> 1.4"
gem "puma", ">= 5.5.1"
gem "puma", ">= 6.3.1"
gem "uglifier", "~> 4.1"

group :development, :test do
gem "byebug", "~> 11.0", platform: :mri

gem "decidim-dev", DECIDIM_VERSION
gem "rubocop-faker"
gem "rubocop-faker", "~> 1.3", ">= 1.3.0"
end

group :development do
gem "faker", "~> 2.14"
gem "letter_opener_web", "~> 1.3"
gem "faker", "3.5.3"
gem "letter_opener_web", "~> 2.0"
gem "listen", "~> 3.1"
gem "spring", "~> 2.0"
gem "spring-watcher-listen", "~> 2.0"
gem "web-console", "~> 3.5"
gem "spring", "~> 4.0"
gem "spring-watcher-listen", "~> 2.1"
gem "web-console", "~> 4.2"
end
Loading
Loading