Skip to content
This repository has been archived by the owner on May 4, 2022. It is now read-only.
/ diversify Public archive

Commit

Permalink
ci: fix rake generating coverage report separately
Browse files Browse the repository at this point in the history
This affects the final coverage as spec:helpers and spec:mailers will generate two separate coverage report, with the older one being overridden
  • Loading branch information
Juneezee committed Mar 28, 2020
1 parent f34fc47 commit 3ec2cac
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ setup-test-env:
script:
- *db-setup
- bundle exec rails db:drop db:create db:schema:load RAILS_ENV=test
- bundle exec rails runner -e test 'Webdrivers.install_dir = Rails.root.join("vendor", "webdrivers"); Webdrivers::Chromedriver.update'
artifacts:
expire_in: 1d
paths:
Expand All @@ -63,15 +62,14 @@ setup-test-env:
dependencies: ['setup-test-env']
needs: ['setup-test-env']
script:
- bundle exec rake $CI_JOB_NAME
- bundle exec rspec ${CI_JOB_NAME//[:]/\/}
artifacts:
paths:
- 'coverage/$CI_JOB_NAME' # look for the unique CI_JOB_NAME folder for this run
name: 'CI_JOB_NAME Coverage' # Give it a unique artifact name
when: always # Always extract the artifact, even if not all tests passed.
expire_in: 1d
- 'coverage/$CI_JOB_NAME'
when: always
expire_in: 1h

spec:mailers spec:helpers spec:policies spec:validators:
spec:helpers spec:mailers spec:policies spec:validators:
extends: .rspec

spec:models:
Expand All @@ -80,8 +78,10 @@ spec:models:
spec:requests:
extends: .rspec

# spec:system:
# extends: .rspec
#spec/system:
# extends: .rspec
# before_script:
# - bundle exec rails runner -e test 'Webdrivers.install_dir = Rails.root.join("vendor", "webdrivers"); Webdrivers::Chromedriver.update'

coverage:
stage: post-test
Expand Down

0 comments on commit 3ec2cac

Please sign in to comment.