Skip to content

Commit

Permalink
Merge pull request voxpupuli#234 from bastelfreak/codecov
Browse files Browse the repository at this point in the history
Implement codecov/update README.md
  • Loading branch information
bastelfreak authored Jul 23, 2021
2 parents 279e993 + d9be98f commit 5cee0eb
Show file tree
Hide file tree
Showing 4 changed files with 72 additions and 8 deletions.
21 changes: 13 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,23 @@ on:
- pull_request
- push

env:
BUNDLE_WITHOUT: release

jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ruby:
- 2.5
- 2.6
- 2.7
- 3.0
include:
- ruby: "2.5"
- ruby: "2.6"
- ruby: "2.7"
- ruby: "3.0"
coverage: "yes"
env:
BUNDLE_WITHOUT: release
name: Ruby ${{ matrix.ruby }}
COVERAGE: ${{ matrix.coverage }}
steps:
- uses: actions/checkout@v2
- name: Install Ruby ${{ matrix.ruby }}
Expand All @@ -26,4 +29,6 @@ jobs:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Run tests
run: bundle exec rake test
run: bundle exec rake spec
- name: Build gem
run: gem build *.gemspec
5 changes: 5 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,8 @@ gemspec
group :release do
gem 'github_changelog_generator', :require => false
end

group :coverage, optional: ENV['COVERAGE']!='yes' do
gem 'simplecov-console', :require => false
gem 'codecov', :require => false
end
30 changes: 30 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
ModuleSync
===========

[![License](https://img.shields.io/github/license/voxpupuli/modulesync.svg)](https://github.com/voxpupuli/modulesync/blob/master/LICENSE)
[![Test](https://github.com/voxpupuli/modulesync/actions/workflows/ci.yml/badge.svg)](https://github.com/voxpupuli/modulesync/actions/workflows/ci.yml)
[![codecov](https://codecov.io/gh/voxpupuli/modulesync/branch/master/graph/badge.svg?token=Mypkl78hvK)](https://codecov.io/gh/voxpupuli/modulesync)
[![Release](https://github.com/voxpupuli/modulesync/actions/workflows/release.yml/badge.svg)](https://github.com/voxpupuli/modulesync/actions/workflows/release.yml)
[![RubyGem Version](https://img.shields.io/gem/v/modulesync.svg)](https://rubygems.org/gems/modulesync)
[![RubyGem Downloads](https://img.shields.io/gem/dt/modulesync.svg)](https://rubygems.org/gems/modulesync)
[![Donated by Puppet Inc](https://img.shields.io/badge/donated%20by-Puppet%20Inc-fb7047.svg)](#transfer-notice)

Table of Contents
-----------------

Expand Down Expand Up @@ -436,3 +444,25 @@ The Templates

See [Puppet's modulesync\_configs](https://github.com/puppetlabs/modulesync_configs) and [Vox Pupuli's modulesync\_config](https://github.com/voxpupuli/modulesync_config)
repositories for different templates currently in use.

## Transfer Notice

This plugin was originally authored by [Puppet Inc](http://puppet.com).
The maintainer preferred that Vox Pupuli take ownership of the module for future improvement and maintenance.
Existing pull requests and issues were transferred over, please fork and continue to contribute at https://github.com/voxpupuli/modulesync.

Previously: https://github.com/puppetlabs/modulesync

## License

This gem is licensed under the Apache-2 license.

## Release information

To make a new release, please do:
* update the version in the gemspec file
* Install gems with `bundle install --with release --path .vendor`
* generate the changelog with `bundle exec rake changelog`
* Check if the new version matches the closed issues/PRs in the changelog
* Create a PR with it
* After it got merged, push a tag. GitHub actions will do the actual release to rubygems and GitHub Packages
24 changes: 24 additions & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1 +1,25 @@
begin
require 'simplecov'
require 'simplecov-console'
require 'codecov'
rescue LoadError
else
SimpleCov.start do
track_files 'lib/**/*.rb'

add_filter '/spec'

enable_coverage :branch

# do not track vendored files
add_filter '/vendor'
add_filter '/.vendor'
end

SimpleCov.formatters = [
SimpleCov::Formatter::Console,
SimpleCov::Formatter::Codecov,
]
end

require 'modulesync'

0 comments on commit 5cee0eb

Please sign in to comment.