rubygitlabgitlab-cisimplecov

Simplecov not generating reports in gitlab in proper format


I'm using simplecov to generate test reports for my ruby project in gitlab. The reports are getting generate successfully but the output is not in proper format. while in my localhost, it's generating output in the proper format. Any idea why this is happening? Here's how my gitlab-ci.yml step looks like :

rspec:
 stage: rspec
 script:
  - bundle exec rspec
 allow_failure: false
 artifacts:
  name: test_report
  paths:
   - coverage/index.html
 when: always

enter image description here enter image description here


Solution

  • SimpleCov generates a bunch of files apart from the index.html, I guess there are some styles as well, so probably you can try adding to the gitlab artifacts the folder instead of only adding the index.html