File tree Expand file tree Collapse file tree 7 files changed +120
-20
lines changed Expand file tree Collapse file tree 7 files changed +120
-20
lines changed Original file line number Diff line number Diff line change 1+ name : Release
2+
3+ on :
4+ push :
5+ tags :
6+ - ' *'
7+
8+ jobs :
9+ release :
10+ runs-on : ubuntu-latest
11+ if : github.repository_owner == 'voxpupuli'
12+ steps :
13+ - uses : actions/checkout@v2
14+ - name : Install Ruby 3.0
15+ uses : ruby/setup-ruby@v1
16+ with :
17+ ruby-version : ' 3.0'
18+ env :
19+ BUNDLE_WITHOUT : release
20+ - name : Build gem
21+ run : gem build *.gemspec
22+ - name : Publish gem to rubygems.org
23+ run : gem push *.gem
24+ env :
25+ GEM_HOST_API_KEY : ' ${{ secrets.RUBYGEMS_AUTH_TOKEN }}'
26+ - name : Setup GitHub packages access
27+ run : |
28+ mkdir -p ~/.gem
29+ echo ":github: Bearer ${{ secrets.GITHUB_TOKEN }}" >> ~/.gem/credentials
30+ chmod 0600 ~/.gem/credentials
31+ - name : Publish gem to GitHub packages
32+ run : gem push --key github --host https://rubygems.pkg.github.com/voxpupuli *.gem
Original file line number Diff line number Diff line change 1+ name : Test
2+
3+ on :
4+ - pull_request
5+ - push
6+
7+ env :
8+ BUNDLE_WITHOUT : release
9+
10+ jobs :
11+ test :
12+ runs-on : ubuntu-latest
13+ strategy :
14+ fail-fast : false
15+ matrix :
16+ include :
17+ - ruby : " 2.4"
18+ - ruby : " 2.5"
19+ - ruby : " 2.6"
20+ - ruby : " 2.7"
21+ - ruby : " 3.0"
22+ coverage : " yes"
23+ env :
24+ COVERAGE : ${{ matrix.coverage }}
25+ steps :
26+ - uses : actions/checkout@v2
27+ - name : Install Ruby ${{ matrix.ruby }}
28+ uses : ruby/setup-ruby@v1
29+ with :
30+ ruby-version : ${{ matrix.ruby }}
31+ bundler-cache : true
32+ - name : Run tests
33+ run : bundle exec rake spec
34+ - name : Verify gem builds
35+ run : gem build *.gemspec
Original file line number Diff line number Diff line change 11/.bundle /
2- /vendor /
2+ /vendor /gems /
33/Gemfile.lock
4- puppet-lint-strict_indent-check- * .gem
5- * .swp
6- * .swo
4+ vendor /bundle
5+ .vendor /
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1- source 'https://rubygems.org'
1+ source ENV [ 'GEM_SOURCE' ] || 'https://rubygems.org'
22
33gemspec
4+
5+ group :release do
6+ gem 'github_changelog_generator' , require : false
7+ end
8+
9+ group :coverage , optional : ENV [ 'COVERAGE' ] !='yes' do
10+ gem 'simplecov-console' , :require => false
11+ gem 'codecov' , :require => false
12+ end
Original file line number Diff line number Diff line change @@ -2,4 +2,18 @@ require 'rspec/core/rake_task'
22
33RSpec ::Core ::RakeTask . new ( :spec )
44
5- task :default => :spec
5+ task default : :spec
6+
7+ begin
8+ require 'rubygems'
9+ require 'github_changelog_generator/task'
10+
11+ GitHubChangelogGenerator ::RakeTask . new :changelog do |config |
12+ config . header = "# Changelog\n \n All notable changes to this project will be documented in this file."
13+ config . exclude_labels = %w{ duplicate question invalid wontfix wont-fix skip-changelog modulesync }
14+ config . user = 'voxpupuli'
15+ config . project = 'puppet-lint-strict_indent-check'
16+ config . future_release = Gem ::Specification . load ( "#{ config . project } .gemspec" ) . version
17+ end
18+ rescue LoadError
19+ end
Original file line number Diff line number Diff line change 1- require 'simplecov'
2- SimpleCov . start
1+ # frozen_string_literal: true
2+
3+ begin
4+ require 'simplecov'
5+ require 'simplecov-console'
6+ require 'codecov'
7+ rescue LoadError
8+ else
9+ SimpleCov . start do
10+ track_files 'lib/**/*.rb'
11+
12+ add_filter '/spec'
13+
14+ enable_coverage :branch
15+
16+ # do not track vendored files
17+ add_filter '/vendor'
18+ add_filter '/.vendor'
19+ end
20+
21+ SimpleCov . formatters = [
22+ SimpleCov ::Formatter ::Console ,
23+ SimpleCov ::Formatter ::Codecov ,
24+ ]
25+ end
326
427require 'puppet-lint'
528
You can’t perform that action at this time.
0 commit comments