diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2955edf6..d0bb9f46 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -48,7 +48,6 @@ jobs: - name: Set up Rails run: | - cp config/secrets.example.yml config/secrets.yml cp config/database.ci.yml config/database.yml - name: Set up database schema diff --git a/Gemfile b/Gemfile index d23931e8..576c0697 100644 --- a/Gemfile +++ b/Gemfile @@ -1,7 +1,7 @@ source "https://rubygems.org" git_source(:github) { |repo| "https://github.com/#{repo}.git" } -ruby "3.1.0" +ruby "~> 3.1" # Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main" gem "rails", "~> 7.0.1" @@ -42,11 +42,13 @@ gem "activerecord-import" gem 'jsonapi-resources' group :development, :test do + gem "brakeman", "~> 5.2" + gem "bundler-audit", "~> 0.9.0" # See https://guides.rubyonrails.org/debugging_rails_applications.html#debugging-with-the-debug-gem gem "debug", platforms: %i[ mri mingw x64_mingw ] - gem 'rspec-rails' - gem 'faker' gem 'factory_bot_rails' + gem 'faker' + gem 'rspec-rails' end group :development do diff --git a/Gemfile.lock b/Gemfile.lock index 14931cdf..a4afe1d7 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -70,7 +70,11 @@ GEM tzinfo (~> 2.0) bootsnap (1.10.3) msgpack (~> 1.2) + brakeman (5.2.1) builder (3.2.4) + bundler-audit (0.9.0.1) + bundler (>= 1.2.0, < 3) + thor (~> 1.0) concurrent-ruby (1.1.9) crass (1.0.6) debug (1.4.0) @@ -195,6 +199,8 @@ PLATFORMS DEPENDENCIES activerecord-import bootsnap + brakeman (~> 5.2) + bundler-audit (~> 0.9.0) debug factory_bot_rails faker diff --git a/config/database.ci.yml b/config/database.ci.yml new file mode 100644 index 00000000..72ab8779 --- /dev/null +++ b/config/database.ci.yml @@ -0,0 +1,6 @@ +test: + adapter: postgresql + encoding: unicode + database: <%= ENV["POSTGRES_DB"]%> + password: <%= ENV.fetch("POSTGRES_PASSWORD") %> + username: <%= ENV['POSTGRES_USER'] %>