Skip to content

Commit

Permalink
Disable Spring in GithubActions
Browse files Browse the repository at this point in the history
I noticed that `rails test` was reporting low coverage (1.46%).  I tried a number of things in the SimpleCov readme without success.  In the process I did discovery that `rake test` was reporting reasonable coverage (82.06%). This lead me to reread the DISABLE_SPRING env var suggestion in the SimpleCov readme which did the trick.  Spring keeps your Rails application preloaded so you don't need to boot it everytime you test, etc.  Not necessary in CI and interferes with SimpleCov which requires that it's loaded before anything else.
  • Loading branch information
pgwillia committed Feb 14, 2023
1 parent cd940d6 commit 83201b7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ jobs:
- name: Run Tests
env:
RAILS_ENV: test
DISABLE_SPRING: "true"
run: |
bundle exec rails db:create db:schema:load
bundle exec rails test
Expand Down

0 comments on commit 83201b7

Please sign in to comment.