From 006e7c3738ee20ef3cef15dc7d72af076ce72f8e Mon Sep 17 00:00:00 2001 From: Thomas von Deyen Date: Tue, 21 Jan 2025 15:08:42 +0100 Subject: [PATCH 1/3] Add an empty current_user method to ApplicationController Necessary for authorize_user stub in controller specs --- spec/dummy/app/controllers/application_controller.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/spec/dummy/app/controllers/application_controller.rb b/spec/dummy/app/controllers/application_controller.rb index e049134..e4576d1 100644 --- a/spec/dummy/app/controllers/application_controller.rb +++ b/spec/dummy/app/controllers/application_controller.rb @@ -1,3 +1,6 @@ # frozen_string_literal: true class ApplicationController < ActionController::Base + # Necessary for authorize_user stub in controller specs + def current_user + end end From 2deb4582a9c8bada39ab3e4a5273bda415ffb6f1 Mon Sep 17 00:00:00 2001 From: Thomas von Deyen Date: Tue, 21 Jan 2025 15:09:34 +0100 Subject: [PATCH 2/3] Add 7.4-stable branch to test matrix Alchemy 7.4 gets released soon, let's test it --- .github/workflows/ci.yml | 11 +++++++++++ Gemfile | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6711cbd..3e7772c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,10 +17,21 @@ jobs: - 7.1-stable - 7.2-stable - 7.3-stable + - 7.4-stable ruby: - "3.1" - "3.2" - "3.3" + - "3.4" + exclude: + - alchemy_branch: 7.0-stable + ruby: "3.4" + - alchemy_branch: 7.1-stable + ruby: "3.4" + - alchemy_branch: 7.2-stable + ruby: "3.4" + - alchemy_branch: 7.3-stable + ruby: "3.4" env: ALCHEMY_BRANCH: ${{ matrix.alchemy_branch }} steps: diff --git a/Gemfile b/Gemfile index c8970bd..a60d56f 100644 --- a/Gemfile +++ b/Gemfile @@ -17,7 +17,7 @@ gemspec # gem 'byebug', group: [:development, :test] gem "sqlite3", "~> 2.2" -alchemy_branch = ENV.fetch("ALCHEMY_BRANCH", "7.3-stable") +alchemy_branch = ENV.fetch("ALCHEMY_BRANCH", "7.4-stable") gem "alchemy_cms", github: "AlchemyCMS/alchemy_cms", branch: alchemy_branch gem "alchemy-devise", github: "AlchemyCMS/alchemy-devise", branch: "main" From 816b2db4421d690c4bec14db400d8d19c3ae095b Mon Sep 17 00:00:00 2001 From: Thomas von Deyen Date: Tue, 21 Jan 2025 15:10:46 +0100 Subject: [PATCH 3/3] Use ubuntu-22.04 for test image on GH actions Alchemy still needs imagemagick, but ubuntu-24.04 image lacks support. The jest specs do not need imagemagick. --- .github/workflows/ci.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3e7772c..a489bb2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,7 +8,7 @@ on: jobs: RSpec: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 strategy: fail-fast: false matrix: @@ -58,10 +58,9 @@ jobs: RAILS_ENV: test DB_USER: user DB_PASSWORD: password - DB_PORT: ${{ job.services.mariadb.ports[3306] }} run: bundle exec rake Jest: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 env: NODE_ENV: test steps: