Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

Commit

Permalink
Fix CI env variables
Browse files Browse the repository at this point in the history
  • Loading branch information
westonganger committed Aug 21, 2024
1 parent 90ba4b5 commit 7c36bf4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
17 changes: 7 additions & 10 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,13 @@ jobs:
- ruby: "3.3"
### TEST RAILS VERSIONS
- ruby: "2.6"
env:
RAILS_VERSION: "5.1"
rails_version: "~> 5.1"
- ruby: "2.6"
env:
RAILS_VERSION: "5.2"
rails_version: "~> 5.2"
- ruby: "2.6"
env:
RAILS_VERSION: "6.0"
rails_version: "~> 6.0"
- ruby: "2.6"
env:
RAILS_VERSION: "6.1"
rails_version: "~> 6.1"
### TEST NON-DEFAULT DATABASES
- ruby: "3.3"
db_gem: "mysql2"
Expand Down Expand Up @@ -69,10 +65,11 @@ jobs:
echo "DATABASE_URL=postgres://postgres:password@localhost:5432/test" >> "$GITHUB_ENV"
fi
- name: Set env DB_GEM
if: ${{ matrix.db_gem }}
- 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
Expand Down
1 change: 0 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ end
gem 'rails', get_env("RAILS_VERSION")

db_gem = get_env("DB_GEM") || "sqlite3"

if db_gem == "sqlite3"
gem db_gem, "~> 1.4"
else
Expand Down

0 comments on commit 7c36bf4

Please sign in to comment.