Skip to content
Open
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
16 changes: 10 additions & 6 deletions .github/workflows/build_app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@ on:
inputs:
ruby_version:
description: 'Ruby Version'
default: "3.1.1"
default: "3.4.7"
type: string
required: false
node_version:
description: 'Node version'
default: '18.17.1'
default: '22.14.0'
required: false
type: string
jobs:
build_app:
name: Build app
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
if: "!startsWith(github.head_ref, 'chore/l10n')"
timeout-minutes: 60
env:
Expand All @@ -34,24 +34,28 @@ jobs:
env:
POSTGRES_PASSWORD: postgres
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ inputs.ruby_version }}
bundler-cache: true
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: ${{ inputs.node_version }}
cache: 'npm'
cache-dependency-path: ./package-lock.json
- uses: actions/cache@v3
- uses: actions/cache@v4
id: app-cache
with:
path: ./spec/decidim_dummy_app/
key: app-${{ github.sha }}
restore-keys: app-${{ github.sha }}
- run: |
sudo apt update
sudo apt install -y libvips libvips-tools
name: Install libvips
- run: bundle exec rake test_app
name: Create test app
shell: "bash"
Expand Down
11 changes: 4 additions & 7 deletions .github/workflows/ci_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,11 @@ on:
pull_request:
branches-ignore:
- "chore/l10n*"
paths:
- "*"
- ".github/**"

env:
CI: "true"
RUBY_VERSION: 3.1.1
NODE_VERSION: 18.17.1
RUBY_VERSION: 3.4.7
NODE_VERSION: 22.14.0

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
Expand All @@ -33,7 +30,7 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: actions/setup-node@master
Expand All @@ -45,7 +42,7 @@ jobs:
bundler-cache: true
- run: bundle exec rubocop -P
name: Lint Ruby files
- run: bundle exec erblint app/**/*.erb
- run: bundle exec erb_lint app/**/*.erb
name: Lint ERB files

tests:
Expand Down
21 changes: 14 additions & 7 deletions .github/workflows/test_app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on:
inputs:
ruby_version:
description: 'Ruby Version'
default: "3.1.1"
default: "3.4.7"
required: false
type: string
test_command:
Expand All @@ -13,13 +13,13 @@ on:
chrome_version:
description: 'Chrome & Chromedriver version'
required: false
default: "126.0.6478.182"
default: "151.0.7922.108"
type: string

jobs:
build_app:
name: Test app
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
if: "!startsWith(github.head_ref, 'chore/l10n')"
timeout-minutes: 60
env:
Expand All @@ -30,7 +30,7 @@ jobs:
services:
validator:
image: ghcr.io/validator/validator:latest
ports: ["8888:8888"]
ports: [ "8888:8888" ]
postgres:
image: postgres:14
ports: ["5432:5432"]
Expand All @@ -41,8 +41,15 @@ jobs:
--health-retries 5
env:
POSTGRES_PASSWORD: postgres
redis:
image: redis
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: ruby/setup-ruby@v1
Expand All @@ -51,15 +58,15 @@ jobs:
bundler-cache: true
- run: |
sudo apt update
sudo apt install libu2f-udev
sudo apt install -y libu2f-udev libvips libvips-tools
wget --no-verbose -O /tmp/chrome.deb https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_${{inputs.chrome_version}}-1_amd64.deb
sudo dpkg -i /tmp/chrome.deb
rm /tmp/chrome.deb
- uses: nanasess/setup-chromedriver@v2
name: Install Chrome version ${{inputs.chrome_version}}
with:
chromedriver-version: ${{inputs.chrome_version}}
- uses: actions/cache@v3
- uses: actions/cache@v4
id: app-cache
with:
path: ./spec/decidim_dummy_app/
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,6 @@ spec/decidim_dummy_app
# default development application
development_app
.rubocop-https*-yml
.byebug_history
.rbenv-vars
.env
23 changes: 5 additions & 18 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,7 @@
inherit_from: https://raw.githubusercontent.com/decidim/decidim/release/0.28-stable/.rubocop.yml
inherit_gem:
decidim-dev: rubocop-decidim.yml

AllCops:
Include:
- "**/*.rb"
- "**/*.rake"
- "**/*.ru"
- "**/Gemfile"
- "**/Rakefile"
RSpec/DescribeClass:
Exclude:
- "development_app/**/*"
- "spec/decidim_dummy_app/**/*"
- "bin/**/*"
- "node_modules/**/*"
- "db/schema.rb"
- "vendor/**/*"

RSpec/FilePath:
Exclude:
- "spec/serializers/user_export_serializer_spec.rb"
- spec/i18n_spec.rb
- "spec/system/**/*"
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.1.1
3.4.7
24 changes: 11 additions & 13 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,34 +1,32 @@
# frozen_string_literal: true

DECIDIM_VERSION = "~> 0.28"

source "https://rubygems.org"

ruby RUBY_VERSION

# Inside the development app, the relative require has to be one level up, as
# the Gemfile is copied to the development_app folder (almost) as is.
base_path = ""
base_path = "../" if File.basename(__dir__) == "development_app"
require_relative "#{base_path}lib/decidim/extra_user_fields/version"

DECIDIM_VERSION = Decidim::ExtraUserFields::DECIDIM_VERSION

gem "decidim", DECIDIM_VERSION
gem "decidim-extra_user_fields", path: "."
gem "decidim-initiatives", DECIDIM_VERSION

gem "bootsnap", "~> 1.3"
gem "country_select", "~> 4.0"
gem "puma", ">= 4.3"
gem "bootsnap", "~> 1.7"
gem "puma", ">= 6.3.1"

group :development, :test do
gem "byebug", "~> 11.0", platform: :mri
gem "decidim-dev", DECIDIM_VERSION
end

group :development do
gem "faker", "~> 3.3.1"
gem "letter_opener_web", "~> 2.0"
gem "listen", "~> 3.1"
gem "rubocop-faker"
gem "spring", "~> 2.0"
gem "spring-watcher-listen", "~> 2.0"
gem "web-console", "~> 4.2"
end

group :test do
gem "rubocop-factory_bot", "!= 2.26.0", require: false
gem "rubocop-rspec_rails", "!= 2.29.0", require: false
end
Loading