From cdcb1ed5ac5e6cefc451a4a5314fba107865d7a1 Mon Sep 17 00:00:00 2001 From: Taketo Takashima Date: Mon, 11 Dec 2023 18:41:49 +0900 Subject: [PATCH] Add trilogy gem to CI --- .github/workflows/ci.yml | 14 ++++++++++++++ Gemfile | 1 + gemfiles/trilogy/6-0.gemfile | 20 ++++++++++++++++++++ gemfiles/trilogy/6-1.gemfile | 20 ++++++++++++++++++++ gemfiles/trilogy/7-0.gemfile | 20 ++++++++++++++++++++ gemfiles/trilogy/7-1.gemfile | 19 +++++++++++++++++++ gemfiles/trilogy/master.gemfile | 21 +++++++++++++++++++++ spec/database.yml | 8 ++++++++ 8 files changed, 123 insertions(+) create mode 100644 gemfiles/trilogy/6-0.gemfile create mode 100644 gemfiles/trilogy/6-1.gemfile create mode 100644 gemfiles/trilogy/7-0.gemfile create mode 100644 gemfiles/trilogy/7-1.gemfile create mode 100644 gemfiles/trilogy/master.gemfile diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4b1019c6..46b3641c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,15 +15,19 @@ jobs: ruby: ['2.7', '3.0', '3.1', '3.2', 'jruby-9.3'] gemfile: - gemfiles/mysql2/6-0.gemfile + - gemfiles/trilogy/6-0.gemfile - gemfiles/postgresql/6-0.gemfile - gemfiles/sqlite3/6-0.gemfile - gemfiles/mysql2/6-1.gemfile + - gemfiles/trilogy/6-1.gemfile - gemfiles/postgresql/6-1.gemfile - gemfiles/sqlite3/6-1.gemfile - gemfiles/mysql2/7-0.gemfile + - gemfiles/trilogy/7-0.gemfile - gemfiles/postgresql/7-0.gemfile - gemfiles/sqlite3/7-0.gemfile - gemfiles/mysql2/7-1.gemfile + - gemfiles/trilogy/7-1.gemfile - gemfiles/postgresql/7-1.gemfile - gemfiles/sqlite3/7-1.gemfile include: @@ -33,18 +37,24 @@ jobs: # Active Record head - ruby: '2.7' gemfile: gemfiles/mysql2/master.gemfile + - ruby: '2.7' + gemfile: gemfiles/trilogy/master.gemfile - ruby: '2.7' gemfile: gemfiles/postgresql/master.gemfile - ruby: '2.7' gemfile: gemfiles/sqlite3/master.gemfile - ruby: '3.0' gemfile: gemfiles/mysql2/master.gemfile + - ruby: '3.0' + gemfile: gemfiles/trilogy/master.gemfile - ruby: '3.0' gemfile: gemfiles/postgresql/master.gemfile - ruby: '3.0' gemfile: gemfiles/sqlite3/master.gemfile - ruby: '3.1' gemfile: gemfiles/mysql2/master.gemfile + - ruby: '3.1' + gemfile: gemfiles/trilogy/master.gemfile - ruby: '3.1' gemfile: gemfiles/postgresql/master.gemfile - ruby: '3.1' @@ -52,12 +62,16 @@ jobs: # MRI Ruby head - ruby: head gemfile: gemfiles/mysql2/master.gemfile + - ruby: head + gemfile: gemfiles/trilogy/master.gemfile - ruby: head gemfile: gemfiles/postgresql/master.gemfile - ruby: head gemfile: gemfiles/sqlite3/master.gemfile - ruby: head gemfile: gemfiles/mysql2/7-0.gemfile + - ruby: head + gemfile: gemfiles/trilogy/7-0.gemfile - ruby: head gemfile: gemfiles/postgresql/7-0.gemfile - ruby: head diff --git a/Gemfile b/Gemfile index ae533c9d..0ab246c4 100644 --- a/Gemfile +++ b/Gemfile @@ -15,6 +15,7 @@ group :test do gem "mysql2", "~> 0.5.0" gem "pg", "~> 1.1" gem "sqlite3" + gem "trilogy" end gem "rspec", ">= 3" diff --git a/gemfiles/trilogy/6-0.gemfile b/gemfiles/trilogy/6-0.gemfile new file mode 100644 index 00000000..1a6fafab --- /dev/null +++ b/gemfiles/trilogy/6-0.gemfile @@ -0,0 +1,20 @@ +# frozen_string_literal: true + +source "https://rubygems.org" + +gem "rake" + +group :test do + platforms :ruby, :mswin, :mingw do + gem "activerecord-trilogy-adapter" + gem "trilogy" + end + + gem "rspec", ">= 2.11" + gem "simplecov", ">= 0.20.0", require: false + gem "simplecov-lcov", ">= 0.8.0", require: false + + gem "activerecord", "~> 6.0.0" +end + +gemspec path: "../../" diff --git a/gemfiles/trilogy/6-1.gemfile b/gemfiles/trilogy/6-1.gemfile new file mode 100644 index 00000000..9dc11e4d --- /dev/null +++ b/gemfiles/trilogy/6-1.gemfile @@ -0,0 +1,20 @@ +# frozen_string_literal: true + +source "https://rubygems.org" + +gem "rake" + +group :test do + platforms :ruby, :mswin, :mingw do + gem "activerecord-trilogy-adapter" + gem "trilogy" + end + + gem "rspec", ">= 2.11" + gem "simplecov", ">= 0.20.0", require: false + gem "simplecov-lcov", ">= 0.8.0", require: false + + gem "activerecord", "~> 6.1.0" +end + +gemspec path: "../../" diff --git a/gemfiles/trilogy/7-0.gemfile b/gemfiles/trilogy/7-0.gemfile new file mode 100644 index 00000000..df4c4d4b --- /dev/null +++ b/gemfiles/trilogy/7-0.gemfile @@ -0,0 +1,20 @@ +# frozen_string_literal: true + +source "https://rubygems.org" + +gem "rake" + +group :test do + platforms :ruby, :mswin, :mingw do + gem "activerecord-trilogy-adapter" + gem "trilogy" + end + + gem "rspec", ">= 2.11" + gem "simplecov", ">= 0.20.0", require: false + gem "simplecov-lcov", ">= 0.8.0", require: false + + gem "activerecord", "~> 7.0.1" +end + +gemspec path: "../../" diff --git a/gemfiles/trilogy/7-1.gemfile b/gemfiles/trilogy/7-1.gemfile new file mode 100644 index 00000000..89bcfbea --- /dev/null +++ b/gemfiles/trilogy/7-1.gemfile @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +source "https://rubygems.org" + +gem "rake" + +group :test do + platforms :ruby, :mswin, :mingw do + gem "trilogy" + end + + gem "rspec", ">= 2.11" + gem "simplecov", ">= 0.20.0", require: false + gem "simplecov-lcov", ">= 0.8.0", require: false + + gem "activerecord", "~> 7.1.0" +end + +gemspec path: "../../" diff --git a/gemfiles/trilogy/master.gemfile b/gemfiles/trilogy/master.gemfile new file mode 100644 index 00000000..09b05a62 --- /dev/null +++ b/gemfiles/trilogy/master.gemfile @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +source "https://rubygems.org" + +gem "rake" + +group :test do + platforms :ruby, :mswin, :mingw do + gem "trilogy" + end + + gem "rspec", ">= 2.11" + gem "simplecov", ">= 0.20.0", require: false + gem "simplecov-lcov", ">= 0.8.0", require: false + + gem "activerecord", github: "rails" +end + +gem "delayed_job", github: "collectiveidea/delayed_job" + +gemspec path: "../../" diff --git a/spec/database.yml b/spec/database.yml index 0c41446c..0fbc8717 100644 --- a/spec/database.yml +++ b/spec/database.yml @@ -14,6 +14,14 @@ mysql2: port: 3306 encoding: utf8 +trilogy: + adapter: trilogy + host: 127.0.0.1 + database: delayed_job_test + username: root + port: 3306 + encoding: utf8 + postgresql: adapter: postgresql host: 127.0.0.1