From 8aae060d1cd80604798d13b41f3a728f59d5366c Mon Sep 17 00:00:00 2001 From: Akira Matsuda Date: Fri, 5 Jan 2024 01:37:38 +0900 Subject: [PATCH] Run tests against both Rails 7.0 and 7.1 --- .github/workflows/test.yml | 14 ++++++++++++++ docker-compose.yml | 10 ++++++++++ gemfiles/rails7.0.gemfile | 24 ++++++++++++++++++++++++ 3 files changed, 48 insertions(+) create mode 100644 gemfiles/rails7.0.gemfile diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a80e6c4..780cee6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -22,6 +22,18 @@ jobs: - name: "Ruby 2.7 & Rails 7" ruby-version: "2.7" rails-version: "7" + - name: "Ruby 3.2 & Rails 7" + ruby-version: "3.2" + rails-version: "7.0" + - name: "Ruby 3.1 & Rails 7.0" + ruby-version: "3.1" + rails-version: "7.0" + - name: "Ruby 3.0 & Rails 7.0" + ruby-version: "3.0" + rails-version: "7.0" + - name: "Ruby 2.7 & Rails 7.0" + ruby-version: "2.7" + rails-version: "7.0" - name: "Ruby 3.0 & Rails 6" ruby-version: "3.0" rails-version: "6" @@ -101,6 +113,8 @@ jobs: include: - ruby-version: "2.7" rails-version: "7" + - ruby-version: "2.7" + rails-version: "7.0" - ruby-version: "2.7" rails-version: "6" - ruby-version: "2.7" diff --git a/docker-compose.yml b/docker-compose.yml index 3aa5250..eb5b2a2 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -11,6 +11,16 @@ services: volumes: - .:/source:delegated + ruby-2.7-rails-7.0: + build: + context: . + dockerfile: dockerfiles/ruby.dockerfile + args: + FROM: ruby:2.7 + RAILS_VERSION: 7.0 + volumes: + - .:/source:delegated + ruby-2.7-rails-6: build: context: . diff --git a/gemfiles/rails7.0.gemfile b/gemfiles/rails7.0.gemfile new file mode 100644 index 0000000..6a469a2 --- /dev/null +++ b/gemfiles/rails7.0.gemfile @@ -0,0 +1,24 @@ +# -*- ruby -*- +# +# Copyright (C) 2021 Sutou Kouhei +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +source "https://rubygems.org/" + +gemspec path: ".." + +gem "rails", "< 7.1" +gem "puma"