Skip to content

Commit

Permalink
Fix CI env variables
Browse files Browse the repository at this point in the history
  • Loading branch information
westonganger committed Sep 1, 2024
1 parent ad0706b commit 76bd822
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 14 deletions.
26 changes: 14 additions & 12 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,32 +20,34 @@ jobs:
- ruby: "2.6"
- ruby: "2.7"
- ruby: "3.0"
db_gem_version: "~> 1.4" # fixes sqlite3 gem dependency issue
- ruby: "3.1"
- ruby: "3.2"
- ruby: "3.3"
### TEST RAILS VERSIONS
- ruby: "2.6"
env:
RAILS_VERSION: "5.2"
rails_version: "~> 5.2.0"
- ruby: "2.6"
env:
RAILS_VERSION: "6.0"
rails_version: "~> 6.0.0"
- ruby: "2.6"
env:
RAILS_VERSION: "6.1"
rails_version: "~> 6.1.0"
- ruby: "3.3"
env:
RAILS_VERSION: "7.0"
rails_version: "~> 7.0.0"
db_gem_version: "~> 1.4" # fixes sqlite3 gem dependency issue
- ruby: "3.3"
env:
rails_version: "7.1"
rails_version: "~> 7.1.0"
- ruby: "3.3"
env:
RAILS_VERSION: "7.2"
rails_version: "~> 7.2.0"

steps:
- uses: actions/checkout@v3

- name: Set env variables
run: |
echo "RAILS_VERSION=${{ matrix.rails_version }}" >> "$GITHUB_ENV"
echo "DB_GEM=${{ matrix.db_gem }}" >> "$GITHUB_ENV"
echo "DB_GEM_VERSION=${{ matrix.db_gem_version }}" >> "$GITHUB_ENV"
- name: Install ruby
uses: ruby/setup-ruby@v1
with:
Expand Down
6 changes: 4 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ def get_env(name)
end

gem "rails", get_env("RAILS_VERSION")
gem "sqlite3"

gem "minitest-spec-rails", git: "https://github.com/metaskills/minitest-spec-rails.git"
db_gem = get_env("DB_GEM") || "sqlite3"
gem db_gem, get_env("DB_GEM_VERSION")

gem "minitest-spec-rails"

0 comments on commit 76bd822

Please sign in to comment.