diff --git a/.github/workflows/build_app.yml b/.github/workflows/build_app.yml index 78fddec11f39..bec1d06c32d2 100644 --- a/.github/workflows/build_app.yml +++ b/.github/workflows/build_app.yml @@ -24,7 +24,7 @@ jobs: RUBYOPT: '-W:no-deprecated' services: postgres: - image: postgres:11 + image: postgres:14 ports: ["5432:5432"] options: >- --health-cmd pg_isready diff --git a/.github/workflows/ci_accountability.yml b/.github/workflows/ci_accountability.yml index 35df4b4d10ac..9e76aaf087b0 100644 --- a/.github/workflows/ci_accountability.yml +++ b/.github/workflows/ci_accountability.yml @@ -38,3 +38,7 @@ jobs: with: working-directory: "decidim-accountability" test_command: bundle exec parallel_test --type rspec --pattern spec/ + bullet_enabled: false + bullet_counter_cache: false + bullet_n_plus_one: false + bullet_unused_eager_loading: false diff --git a/.github/workflows/ci_admin.yml b/.github/workflows/ci_admin.yml index 5f3408cf5f13..0995bb83beb8 100644 --- a/.github/workflows/ci_admin.yml +++ b/.github/workflows/ci_admin.yml @@ -39,3 +39,7 @@ jobs: with: working-directory: "decidim-admin" test_command: ${{ matrix.test-command }} + bullet_enabled: false + bullet_counter_cache: false + bullet_n_plus_one: false + bullet_unused_eager_loading: false diff --git a/.github/workflows/ci_api.yml b/.github/workflows/ci_api.yml index 6babb18b13c0..42aeef86cf12 100644 --- a/.github/workflows/ci_api.yml +++ b/.github/workflows/ci_api.yml @@ -34,3 +34,7 @@ jobs: with: working-directory: "decidim-api" test_command: bundle exec parallel_test --type rspec --pattern spec/ + bullet_enabled: true + bullet_counter_cache: true + bullet_n_plus_one: true + bullet_unused_eager_loading: true diff --git a/.github/workflows/ci_assemblies.yml b/.github/workflows/ci_assemblies.yml index be0dafc43363..efc4f6b3b884 100644 --- a/.github/workflows/ci_assemblies.yml +++ b/.github/workflows/ci_assemblies.yml @@ -33,3 +33,7 @@ jobs: with: working-directory: "decidim-assemblies" test_command: bundle exec parallel_test --type rspec --pattern spec/ + bullet_enabled: true + bullet_counter_cache: true + bullet_n_plus_one: true + bullet_unused_eager_loading: true diff --git a/.github/workflows/ci_blogs.yml b/.github/workflows/ci_blogs.yml index d5a337af2d7a..3514da2dd2be 100644 --- a/.github/workflows/ci_blogs.yml +++ b/.github/workflows/ci_blogs.yml @@ -36,3 +36,7 @@ jobs: with: working-directory: "decidim-blogs" test_command: bundle exec parallel_test --type rspec --pattern spec/ + bullet_enabled: false + bullet_counter_cache: false + bullet_n_plus_one: false + bullet_unused_eager_loading: false diff --git a/.github/workflows/ci_budgets.yml b/.github/workflows/ci_budgets.yml index 2d1803be2b7c..bccf3b8e5ceb 100644 --- a/.github/workflows/ci_budgets.yml +++ b/.github/workflows/ci_budgets.yml @@ -35,3 +35,7 @@ jobs: with: working-directory: "decidim-budgets" test_command: bundle exec parallel_test --type rspec --pattern spec/ + bullet_enabled: false + bullet_counter_cache: false + bullet_n_plus_one: false + bullet_unused_eager_loading: false diff --git a/.github/workflows/ci_comments.yml b/.github/workflows/ci_comments.yml index 5f889a9eb26f..137edf4777c0 100644 --- a/.github/workflows/ci_comments.yml +++ b/.github/workflows/ci_comments.yml @@ -33,3 +33,7 @@ jobs: with: working-directory: "decidim-comments" test_command: bundle exec parallel_test --type rspec --pattern spec/ + bullet_enabled: false + bullet_counter_cache: false + bullet_n_plus_one: false + bullet_unused_eager_loading: false diff --git a/.github/workflows/ci_conferences.yml b/.github/workflows/ci_conferences.yml index 5c5f35952912..4c45a9f6957f 100644 --- a/.github/workflows/ci_conferences.yml +++ b/.github/workflows/ci_conferences.yml @@ -34,3 +34,7 @@ jobs: with: working-directory: "decidim-conferences" test_command: bundle exec parallel_test --type rspec --pattern spec/ + bullet_enabled: false + bullet_counter_cache: false + bullet_n_plus_one: false + bullet_unused_eager_loading: false diff --git a/.github/workflows/ci_core.yml b/.github/workflows/ci_core.yml index 3f3758ed81af..efd2ecaf5e04 100644 --- a/.github/workflows/ci_core.yml +++ b/.github/workflows/ci_core.yml @@ -40,4 +40,8 @@ jobs: with: working-directory: "decidim-core" test_command: ${{ matrix.test-command }} + bullet_enabled: false + bullet_counter_cache: false + bullet_n_plus_one: false + bullet_unused_eager_loading: false diff --git a/.github/workflows/ci_debates.yml b/.github/workflows/ci_debates.yml index c358c6d5fa7f..2884a0acf406 100644 --- a/.github/workflows/ci_debates.yml +++ b/.github/workflows/ci_debates.yml @@ -34,3 +34,7 @@ jobs: with: working-directory: "decidim-debates" test_command: bundle exec parallel_test --type rspec --pattern spec/ + bullet_enabled: false + bullet_counter_cache: false + bullet_n_plus_one: false + bullet_unused_eager_loading: false diff --git a/.github/workflows/ci_dev_system.yml b/.github/workflows/ci_dev_system.yml index ef2489c3e990..7d89e7aa5da9 100644 --- a/.github/workflows/ci_dev_system.yml +++ b/.github/workflows/ci_dev_system.yml @@ -31,3 +31,7 @@ jobs: with: working-directory: "decidim-dev" test_command: bundle exec parallel_test --type rspec --pattern spec/ + bullet_enabled: true + bullet_counter_cache: true + bullet_n_plus_one: true + bullet_unused_eager_loading: true diff --git a/.github/workflows/ci_elections.yml b/.github/workflows/ci_elections.yml index cc8b87fb0bea..3921eae8b63f 100644 --- a/.github/workflows/ci_elections.yml +++ b/.github/workflows/ci_elections.yml @@ -43,3 +43,7 @@ jobs: with: working-directory: "decidim-elections" test_command: ${{ matrix.test-command }} + bullet_enabled: false + bullet_counter_cache: false + bullet_n_plus_one: false + bullet_unused_eager_loading: false diff --git a/.github/workflows/ci_forms.yml b/.github/workflows/ci_forms.yml index 70345e389aec..4b43d19f3550 100644 --- a/.github/workflows/ci_forms.yml +++ b/.github/workflows/ci_forms.yml @@ -33,3 +33,7 @@ jobs: with: working-directory: "decidim-forms" test_command: bundle exec parallel_test --type rspec --pattern spec/ + bullet_enabled: false + bullet_counter_cache: false + bullet_n_plus_one: false + bullet_unused_eager_loading: false diff --git a/.github/workflows/ci_generators.yml b/.github/workflows/ci_generators.yml index fa45d8db803d..93196e23944f 100644 --- a/.github/workflows/ci_generators.yml +++ b/.github/workflows/ci_generators.yml @@ -42,7 +42,7 @@ jobs: timeout-minutes: 60 services: postgres: - image: postgres:11 + image: postgres:14 ports: ["5432:5432"] options: >- --health-cmd pg_isready diff --git a/.github/workflows/ci_initiatives.yml b/.github/workflows/ci_initiatives.yml index 881dd042206e..62c063e841e9 100644 --- a/.github/workflows/ci_initiatives.yml +++ b/.github/workflows/ci_initiatives.yml @@ -43,3 +43,7 @@ jobs: with: working-directory: "decidim-initiatives" test_command: ${{ matrix.test-command }} + bullet_enabled: false + bullet_counter_cache: false + bullet_n_plus_one: false + bullet_unused_eager_loading: false diff --git a/.github/workflows/ci_meetings.yml b/.github/workflows/ci_meetings.yml index 707ec147e4c7..b5c37aff551a 100644 --- a/.github/workflows/ci_meetings.yml +++ b/.github/workflows/ci_meetings.yml @@ -43,3 +43,7 @@ jobs: with: working-directory: "decidim-meetings" test_command: ${{ matrix.test-command }} + bullet_enabled: false + bullet_counter_cache: false + bullet_n_plus_one: false + bullet_unused_eager_loading: false diff --git a/.github/workflows/ci_pages.yml b/.github/workflows/ci_pages.yml index c96096ffc393..bfbec05aec68 100644 --- a/.github/workflows/ci_pages.yml +++ b/.github/workflows/ci_pages.yml @@ -33,3 +33,7 @@ jobs: with: working-directory: "decidim-pages" test_command: bundle exec parallel_test --type rspec --pattern spec/ + bullet_enabled: true + bullet_counter_cache: true + bullet_n_plus_one: true + bullet_unused_eager_loading: true diff --git a/.github/workflows/ci_participatory_processes.yml b/.github/workflows/ci_participatory_processes.yml index 62b3554deaca..237614acdec6 100644 --- a/.github/workflows/ci_participatory_processes.yml +++ b/.github/workflows/ci_participatory_processes.yml @@ -34,3 +34,7 @@ jobs: with: working-directory: "decidim-participatory_processes" test_command: bundle exec parallel_test --type rspec --pattern spec/ + bullet_enabled: false + bullet_counter_cache: false + bullet_n_plus_one: false + bullet_unused_eager_loading: false diff --git a/.github/workflows/ci_performance_metrics_monitoring.yml b/.github/workflows/ci_performance_metrics_monitoring.yml index 4eeef0b6df8a..4b98e33c8712 100644 --- a/.github/workflows/ci_performance_metrics_monitoring.yml +++ b/.github/workflows/ci_performance_metrics_monitoring.yml @@ -36,7 +36,7 @@ jobs: timeout-minutes: 60 services: postgres: - image: postgres:11 + image: postgres:14 ports: ["5432:5432"] options: >- --health-cmd pg_isready diff --git a/.github/workflows/ci_proposals.yml b/.github/workflows/ci_proposals.yml index d05097e6b7d9..8ab1407dc8bb 100644 --- a/.github/workflows/ci_proposals.yml +++ b/.github/workflows/ci_proposals.yml @@ -46,5 +46,9 @@ jobs: with: working-directory: "decidim-proposals" test_command: ${{ matrix.test-command }} + bullet_enabled: false + bullet_counter_cache: false + bullet_n_plus_one: false + bullet_unused_eager_loading: false diff --git a/.github/workflows/ci_sortitions.yml b/.github/workflows/ci_sortitions.yml index ef1f78a32a2a..4917b4b55acd 100644 --- a/.github/workflows/ci_sortitions.yml +++ b/.github/workflows/ci_sortitions.yml @@ -35,3 +35,7 @@ jobs: with: working-directory: "decidim-sortitions" test_command: REDESIGN_ENABLED="false" bundle exec parallel_test --type rspec --pattern spec/ + bullet_enabled: false + bullet_counter_cache: false + bullet_n_plus_one: false + bullet_unused_eager_loading: false diff --git a/.github/workflows/ci_surveys.yml b/.github/workflows/ci_surveys.yml index 9363723f1919..3f3c37751678 100644 --- a/.github/workflows/ci_surveys.yml +++ b/.github/workflows/ci_surveys.yml @@ -36,3 +36,7 @@ jobs: with: working-directory: "decidim-surveys" test_command: bundle exec parallel_test --type rspec --pattern spec/ + bullet_enabled: false + bullet_counter_cache: false + bullet_n_plus_one: false + bullet_unused_eager_loading: false diff --git a/.github/workflows/ci_system.yml b/.github/workflows/ci_system.yml index 8b253494c38c..283fe58ca54a 100644 --- a/.github/workflows/ci_system.yml +++ b/.github/workflows/ci_system.yml @@ -31,4 +31,8 @@ jobs: secrets: inherit with: working-directory: "decidim-system" - test_command: REDESIGN_ENABLED="false" bundle exec parallel_test --type rspec --pattern spec/ + test_command: bundle exec parallel_test --type rspec --pattern spec/ + bullet_enabled: true + bullet_counter_cache: true + bullet_n_plus_one: true + bullet_unused_eager_loading: true diff --git a/.github/workflows/ci_templates.yml b/.github/workflows/ci_templates.yml index 01716146bb41..eef455a04591 100644 --- a/.github/workflows/ci_templates.yml +++ b/.github/workflows/ci_templates.yml @@ -35,3 +35,7 @@ jobs: with: working-directory: "decidim-templates" test_command: REDESIGN_ENABLED="false" bundle exec parallel_test --type rspec --pattern spec/ + bullet_enabled: false + bullet_counter_cache: false + bullet_n_plus_one: false + bullet_unused_eager_loading: false diff --git a/.github/workflows/ci_verifications.yml b/.github/workflows/ci_verifications.yml index a59cd62c4faf..c002536c87fb 100644 --- a/.github/workflows/ci_verifications.yml +++ b/.github/workflows/ci_verifications.yml @@ -33,3 +33,7 @@ jobs: with: working-directory: "decidim-verifications" test_command: bundle exec parallel_test --type rspec --pattern spec/ + bullet_enabled: true + bullet_counter_cache: true + bullet_n_plus_one: true + bullet_unused_eager_loading: true diff --git a/.github/workflows/lint_pr_format.yml b/.github/workflows/lint_pr_format.yml index 3941b73faeb4..bde16ab395b3 100644 --- a/.github/workflows/lint_pr_format.yml +++ b/.github/workflows/lint_pr_format.yml @@ -18,5 +18,6 @@ jobs: with: disallowed_prefixes: "feat/,feature/,fix/,chore/,build/,ci/,refactor/,docs/,wip/,fix:" prefix_case_sensitive: false + regex: "^[A-Z].+" min_length: 5 max_length: 100 diff --git a/.github/workflows/test_app.yml b/.github/workflows/test_app.yml index 4799a1df43a9..c4da28ce8c19 100644 --- a/.github/workflows/test_app.yml +++ b/.github/workflows/test_app.yml @@ -18,6 +18,26 @@ on: description: 'The testing command to be ran' required: true type: string + bullet_enabled: + description: 'Enable bullet performance testing' + required: false + default: false + type: boolean + bullet_n_plus_one: + description: 'Enable bullet n+1 testing' + required: false + default: false + type: boolean + bullet_counter_cache: + description: 'Enable bullet counter cache testing' + required: false + default: false + type: boolean + bullet_unused_eager_loading: + description: 'Enable bullet unused eager loading testing' + required: false + default: false + type: boolean jobs: build_app: @@ -35,7 +55,7 @@ jobs: image: ghcr.io/validator/validator:latest ports: ["8888:8888"] postgres: - image: postgres:11 + image: postgres:14 ports: ["5432:5432"] options: >- --health-cmd pg_isready @@ -64,10 +84,6 @@ jobs: ruby-version: ${{ inputs.ruby_version }} bundler-cache: true - uses: nanasess/setup-chromedriver@v2 - with: - # TODO: Unpin when nanasess/setup-chromedriver#190 is fixed: - # https://github.com/nanasess/setup-chromedriver/issues/190 - chromedriver-version: 114.0.5735.90 - uses: actions/cache@v3 id: app-cache with: @@ -89,6 +105,10 @@ jobs: RUBY_VERSION: ${{ inputs.ruby_version }} DECIDIM_MODULE: ${{ inputs.working-directory }} CODECOV_TOKEN: ${{ inputs.codecov_token }} + DECIDIM_BULLET_ENABLED: ${{ inputs.bullet_enabled }} + DECIDIM_BULLET_N_PLUS_ONE: ${{ inputs.bullet_n_plus_one }} + DECIDIM_BULLET_COUNTER_CACHE: ${{ inputs.bullet_counter_cache }} + DECIDIM_BULLET_UNUSED_EAGER: ${{ inputs.bullet_unused_eager_loading }} DISPLAY: ":99" CI: "true" SIMPLECOV: "true" diff --git a/Gemfile.lock b/Gemfile.lock index 28551b1db23c..7829eef41d94 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -109,6 +109,7 @@ PATH decidim-comments (= 0.28.0.dev) decidim-core (= 0.28.0.dev) decidim-dev (0.28.0.dev) + bullet (~> 7.0) byebug (~> 11.0) capybara (~> 3.39) decidim (= 0.28.0.dev) @@ -278,6 +279,9 @@ GEM brakeman (5.4.1) browser (2.7.1) builder (3.2.4) + bullet (7.0.7) + activesupport (>= 3.0.0) + uniform_notifier (~> 1.11) byebug (11.1.3) capybara (3.39.0) addressable @@ -763,6 +767,7 @@ GEM concurrent-ruby (~> 1.0) uber (0.1.0) unicode-display_width (2.4.2) + uniform_notifier (1.16.0) valid_email2 (4.0.6) activemodel (>= 3.2) mail (~> 2.5) diff --git a/config/i18n-tasks.yml b/config/i18n-tasks.yml index f8471271560d..4888765bd186 100644 --- a/config/i18n-tasks.yml +++ b/config/i18n-tasks.yml @@ -117,6 +117,7 @@ ignore_missing: - decidim.budgets.projects_helper.current_rule_call_for_action_text.* - decidim.debates.debate_m.footer.commented_time_ago - date.abbr_day_names + - date.day_names - date.month_names - explanation @@ -160,6 +161,11 @@ ignore_unused: - decidim.proposals.proposals.wizard_aside.back_from_step_2 - decidim.proposals.proposals.wizard_aside.back_from_step_3 - decidim.proposals.proposals.wizard_aside.back_from_step_4 + - decidim.proposals.proposals.wizard_steps.current_step + - decidim.proposals.proposals.wizard_steps.step_1 + - decidim.proposals.proposals.wizard_steps.step_2 + - decidim.proposals.proposals.wizard_steps.step_3 + - decidim.proposals.proposals.wizard_steps.step_4 - decidim.proposals.proposals.show.proposal_accepted_reason - decidim.proposals.proposals.show.proposal_in_evaluation_reason - decidim.proposals.proposals.show.proposal_rejected_reason diff --git a/decidim-accountability/app/cells/decidim/accountability/result_metadata/show_footer.erb b/decidim-accountability/app/cells/decidim/accountability/result_metadata/show_footer.erb index 76004d526d94..6a7e260ff2bf 100644 --- a/decidim-accountability/app/cells/decidim/accountability/result_metadata/show_footer.erb +++ b/decidim-accountability/app/cells/decidim/accountability/result_metadata/show_footer.erb @@ -1,6 +1,6 @@ -