Skip to content

Commit

Permalink
Finish Setting Up CI
Browse files Browse the repository at this point in the history
  • Loading branch information
westonganger committed Apr 25, 2021
1 parent a228941 commit ac414c8
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 60 deletions.
34 changes: 10 additions & 24 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,24 +13,18 @@ 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
- ruby: 3.0

### 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 }}"
Expand Down Expand Up @@ -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 }}"
Expand All @@ -102,7 +92,7 @@ jobs:
- name: Run tests
env:
DATABASE_URL: mysql2://root:[email protected]:3306/test
DATABASE_URL: //root:[email protected]:3306/test
RAILS_ENV: test
run: |
#bundle exec rake db:test:prepare
Expand All @@ -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 }}"
Expand Down
12 changes: 6 additions & 6 deletions Appraisals
Original file line number Diff line number Diff line change
Expand Up @@ -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,
],
]

Expand Down
9 changes: 0 additions & 9 deletions gemfiles/ar_5.2.0_pt_master.gemfile

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -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: "../"
9 changes: 0 additions & 9 deletions gemfiles/ar_6.0.0_pt_master.gemfile

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -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: "../"
9 changes: 0 additions & 9 deletions gemfiles/ar_6.1.0_pt_master.gemfile

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -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: "../"

0 comments on commit ac414c8

Please sign in to comment.