Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(maint) implement simplecov for appveyor #252

Merged
merged 1 commit into from
Jun 4, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ Travis uses a .travis.yml file in the root of your repository to learn about you
|appveyor\_bundle\_install|Defines the bundle install command for the appveyor execution run. In our case we use bundle install `--without system_tests` as default, therefore avoiding redundant gem installation.|
|environment|Defines any environment variables wanted for the job run. In our case we default to the latest Puppet 4 gem version.|
|matrix|This defines the matrix of jobs to be executed at runtime. Each defines environment variables for that specific job run. In our defaults we have a Ruby version specfied, followed by the check that will be run for that job.|
|simplecov|Set to `true` to enable collecting ruby code coverage.|
|test\_script|This defines the test script that will be executed. For our purposes the default is set to `bundle exec rake %CHECK%`. As appveyor iterates through the test matrix as we defined above, it resolves the variable CHECK and runs the resulting command. For example, our last test script would be executed as `bundle exec rake spec`, which would run the spec tests of the module.|

### Rakefile
Expand Down
3 changes: 3 additions & 0 deletions moduleroot/appveyor.yml.erb
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ environment:
<%- (@configs['environment'] || []).each do |key, value| -%>
<%= key %>: <%= value %>
<%- end -%>
<% if @configs['simplecov'] -%>
SIMPLECOV: yes
<% end -%>
matrix:
<%- (@configs['matrix'] + (@configs['matrix_extras'] || [])).each do |matrix| -%>
-
Expand Down