From ac414c8e0d28bfd66eda685a3502e9f509d07c91 Mon Sep 17 00:00:00 2001 From: Weston Ganger Date: Sat, 24 Apr 2021 18:54:24 -0700 Subject: [PATCH] Finish Setting Up CI --- .github/workflows/test.yml | 34 ++++++------------- Appraisals | 12 +++---- gemfiles/ar_5.2.0_pt_master.gemfile | 9 ----- ...pt_12.0.gemfile => ar_5.2_pt_12.0.gemfile} | 2 +- gemfiles/ar_6.0.0_pt_master.gemfile | 9 ----- ...pt_12.0.gemfile => ar_6.0_pt_12.0.gemfile} | 2 +- gemfiles/ar_6.1.0_pt_master.gemfile | 9 ----- ...pt_12.0.gemfile => ar_6.1_pt_12.0.gemfile} | 2 +- 8 files changed, 19 insertions(+), 60 deletions(-) delete mode 100644 gemfiles/ar_5.2.0_pt_master.gemfile rename gemfiles/{ar_5.2.0_pt_12.0.gemfile => ar_5.2_pt_12.0.gemfile} (83%) delete mode 100644 gemfiles/ar_6.0.0_pt_master.gemfile rename gemfiles/{ar_6.1.0_pt_12.0.gemfile => ar_6.0_pt_12.0.gemfile} (83%) delete mode 100644 gemfiles/ar_6.1.0_pt_master.gemfile rename gemfiles/{ar_6.0.0_pt_12.0.gemfile => ar_6.1_pt_12.0.gemfile} (83%) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d4b9cf4..d22f8b6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,8 +13,6 @@ jobs: matrix: include: ### TEST ALL RUBY VERSIONS, USE DEFAULT GEMFILE - - ruby: 2.3 - - ruby: 2.4 - ruby: 2.5 - ruby: 2.6 - ruby: 2.7 @@ -22,15 +20,11 @@ jobs: ### RAILS VERSION TESTING - ruby: 2.6 - gemfile: gemfiles/rails_5.0.sqlite3.gemfile + gemfile: gemfiles/ar_5.2_pt_12.0.gemfile - ruby: 2.6 - gemfile: gemfiles/rails_5.1.sqlite3.gemfile + gemfile: gemfiles/ar_6.0_pt_12.0.gemfile - ruby: 2.6 - gemfile: gemfiles/rails_5.2.sqlite3.gemfile - - ruby: 2.6 - gemfile: gemfiles/rails_6.0.sqlite3.gemfile - - ruby: 2.6 - gemfile: gemfiles/rails_6.1.sqlite3.gemfile + gemfile: gemfiles/ar_6.1_pt_12.0.gemfile env: BUNDLE_GEMFILE: "${{ matrix.gemfile }}" @@ -73,15 +67,11 @@ jobs: ### RAILS VERSION TESTING ### DONT WORRY ABOUT TESTING ALL RUBY VERSIONS. THIS IS COVERED IN THE SQLITE3 TESTS - ruby: 2.6 - gemfile: gemfiles/rails_5.0.mysql2.gemfile - - ruby: 2.6 - gemfile: gemfiles/rails_5.1.mysql2.gemfile + gemfile: gemfiles/ar_5.2_pt_12.0.gemfile - ruby: 2.6 - gemfile: gemfiles/rails_5.2.mysql2.gemfile + gemfile: gemfiles/ar_6.0_pt_12.0.gemfile - ruby: 2.6 - gemfile: gemfiles/rails_6.0.mysql2.gemfile - - ruby: 2.6 - gemfile: gemfiles/rails_6.1.mysql2.gemfile + gemfile: gemfiles/ar_6.1_pt_12.0.gemfile env: BUNDLE_GEMFILE: "${{ matrix.gemfile }}" @@ -102,7 +92,7 @@ jobs: - name: Run tests env: - DATABASE_URL: mysql2://root:password@127.0.0.1:3306/test + DATABASE_URL: //root:password@127.0.0.1:3306/test RAILS_ENV: test run: | #bundle exec rake db:test:prepare @@ -127,15 +117,11 @@ jobs: ### RAILS VERSION TESTING ### DONT WORRY ABOUT TESTING ALL RUBY VERSIONS. THIS IS COVERED IN THE SQLITE3 TESTS - ruby: 2.6 - gemfile: gemfiles/rails_5.0.pg.gemfile - - ruby: 2.6 - gemfile: gemfiles/rails_5.1.pg.gemfile - - ruby: 2.6 - gemfile: gemfiles/rails_5.2.pg.gemfile + gemfile: gemfiles/ar_5.2_pt_12.0.gemfile - ruby: 2.6 - gemfile: gemfiles/rails_6.0.pg.gemfile + gemfile: gemfiles/ar_6.0_pt_12.0.gemfile - ruby: 2.6 - gemfile: gemfiles/rails_6.1.pg.gemfile + gemfile: gemfiles/ar_6.1_pt_12.0.gemfile env: BUNDLE_GEMFILE: "${{ matrix.gemfile }}" diff --git a/Appraisals b/Appraisals index 79ff00a..172a786 100644 --- a/Appraisals +++ b/Appraisals @@ -6,23 +6,23 @@ # > the version from the appraisal takes precedence. # > https://github.com/thoughtbot/appraisal +### WHEN UPDATING THESE VERSIONS DONT FORGOT TO UPDATE .github/workflows/test.yml pt_versions = [ '~>12.0', - 'master', ] ar_versions = [ [ - '~>5.2.0', + '~>5.2', pt_versions, ], [ - '~>6.0.0', - pt_versions.select{|x| x.sub('~>', '').to_f >= 10 || x == 'master' }, + '~>6.0', + pt_versions, ], [ - '~>6.1.0', - pt_versions.select{|x| x.sub('~>', '').to_f >= 10 || x == 'master' }, + '~>6.1', + pt_versions, ], ] diff --git a/gemfiles/ar_5.2.0_pt_master.gemfile b/gemfiles/ar_5.2.0_pt_master.gemfile deleted file mode 100644 index be0c6d7..0000000 --- a/gemfiles/ar_5.2.0_pt_master.gemfile +++ /dev/null @@ -1,9 +0,0 @@ -# This file was generated by Appraisal - -source "https://rubygems.org" - -gem "rails-controller-testing" -gem "paper_trail", git: "https://github.com/paper-trail-gem/paper_trail.git" -gem "activerecord", "~>5.2.0" - -gemspec path: "../" diff --git a/gemfiles/ar_5.2.0_pt_12.0.gemfile b/gemfiles/ar_5.2_pt_12.0.gemfile similarity index 83% rename from gemfiles/ar_5.2.0_pt_12.0.gemfile rename to gemfiles/ar_5.2_pt_12.0.gemfile index 8be75bf..890225b 100644 --- a/gemfiles/ar_5.2.0_pt_12.0.gemfile +++ b/gemfiles/ar_5.2_pt_12.0.gemfile @@ -4,6 +4,6 @@ source "https://rubygems.org" gem "rails-controller-testing" gem "paper_trail", "~>12.0" -gem "activerecord", "~>5.2.0" +gem "activerecord", "~>5.2" gemspec path: "../" diff --git a/gemfiles/ar_6.0.0_pt_master.gemfile b/gemfiles/ar_6.0.0_pt_master.gemfile deleted file mode 100644 index 9c548d6..0000000 --- a/gemfiles/ar_6.0.0_pt_master.gemfile +++ /dev/null @@ -1,9 +0,0 @@ -# This file was generated by Appraisal - -source "https://rubygems.org" - -gem "rails-controller-testing" -gem "paper_trail", git: "https://github.com/paper-trail-gem/paper_trail.git" -gem "activerecord", "~>6.0.0" - -gemspec path: "../" diff --git a/gemfiles/ar_6.1.0_pt_12.0.gemfile b/gemfiles/ar_6.0_pt_12.0.gemfile similarity index 83% rename from gemfiles/ar_6.1.0_pt_12.0.gemfile rename to gemfiles/ar_6.0_pt_12.0.gemfile index 0f3547e..322543c 100644 --- a/gemfiles/ar_6.1.0_pt_12.0.gemfile +++ b/gemfiles/ar_6.0_pt_12.0.gemfile @@ -4,6 +4,6 @@ source "https://rubygems.org" gem "rails-controller-testing" gem "paper_trail", "~>12.0" -gem "activerecord", "~>6.1.0" +gem "activerecord", "~>6.0" gemspec path: "../" diff --git a/gemfiles/ar_6.1.0_pt_master.gemfile b/gemfiles/ar_6.1.0_pt_master.gemfile deleted file mode 100644 index 476f17a..0000000 --- a/gemfiles/ar_6.1.0_pt_master.gemfile +++ /dev/null @@ -1,9 +0,0 @@ -# This file was generated by Appraisal - -source "https://rubygems.org" - -gem "rails-controller-testing" -gem "paper_trail", git: "https://github.com/paper-trail-gem/paper_trail.git" -gem "activerecord", "~>6.1.0" - -gemspec path: "../" diff --git a/gemfiles/ar_6.0.0_pt_12.0.gemfile b/gemfiles/ar_6.1_pt_12.0.gemfile similarity index 83% rename from gemfiles/ar_6.0.0_pt_12.0.gemfile rename to gemfiles/ar_6.1_pt_12.0.gemfile index 428c48b..0556895 100644 --- a/gemfiles/ar_6.0.0_pt_12.0.gemfile +++ b/gemfiles/ar_6.1_pt_12.0.gemfile @@ -4,6 +4,6 @@ source "https://rubygems.org" gem "rails-controller-testing" gem "paper_trail", "~>12.0" -gem "activerecord", "~>6.0.0" +gem "activerecord", "~>6.1" gemspec path: "../"