From 05e31963abeb7b756b648155de86ff28589127af Mon Sep 17 00:00:00 2001 From: Sunjay Armstead <65554107+sarmstead@users.noreply.github.com> Date: Wed, 16 Oct 2024 01:38:57 -0400 Subject: [PATCH] Set Rails master key to allow CI to build --- .github/workflows/ci.yml | 6 +++--- Gemfile | 2 ++ Gemfile.lock | 5 +++++ 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 038861c..5df3b59 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -60,7 +60,6 @@ jobs: postgres: image: postgres env: - POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres ports: - 5432:5432 @@ -88,8 +87,9 @@ jobs: - name: Run tests env: RAILS_ENV: test - DATABASE_URL: postgres://postgres:postgres@localhost:5432 - # REDIS_URL: redis://localhost:6379/0 + RAILS_MASTER_KEY: ${{ secrets.RAILS_MASTER_KEY }} + DB_USERNAME: ${{ secrets.DB_USERNAME }} + DB_PASSWORD: ${{ secrets.DB_PASSWORD }} run: bin/rails db:test:prepare test test:system - name: Keep screenshots from failed system tests diff --git a/Gemfile b/Gemfile index 4c1e319..b1cab50 100644 --- a/Gemfile +++ b/Gemfile @@ -36,6 +36,8 @@ gem "bootsnap", require: false # Use Active Storage variants [https://guides.rubyonrails.org/active_storage_overview.html#transforming-images] # gem "image_processing", "~> 1.2" +gem "dotenv-rails", "~> 3.1" + group :development, :test do # See https://guides.rubyonrails.org/debugging_rails_applications.html#debugging-with-the-debug-gem gem "debug", platforms: %i[ mri windows ], require: "debug/prelude" diff --git a/Gemfile.lock b/Gemfile.lock index 092d581..c244912 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -99,6 +99,10 @@ GEM irb (~> 1.10) reline (>= 0.3.8) diff-lcs (1.5.1) + dotenv (3.1.4) + dotenv-rails (3.1.4) + dotenv (= 3.1.4) + railties (>= 6.1) drb (2.2.1) erubi (1.13.0) globalid (1.2.1) @@ -323,6 +327,7 @@ DEPENDENCIES brakeman capybara debug + dotenv-rails (~> 3.1) importmap-rails jbuilder pg (~> 1.1)