File tree 6 files changed +88
-15
lines changed
6 files changed +88
-15
lines changed Original file line number Diff line number Diff line change
1
+ version : 2
2
+ updates :
3
+ # raise PRs for gem updates
4
+ - package-ecosystem : bundler
5
+ directory : " /"
6
+ schedule :
7
+ interval : daily
8
+ time : " 13:00"
9
+ open-pull-requests-limit : 10
10
+
11
+ # Maintain dependencies for GitHub Actions
12
+ - package-ecosystem : github-actions
13
+ directory : " /"
14
+ schedule :
15
+ interval : daily
16
+ time : " 13:00"
17
+ open-pull-requests-limit : 10
Original file line number Diff line number Diff line change @@ -10,14 +10,16 @@ jobs:
10
10
runs-on : ubuntu-latest
11
11
if : github.repository_owner == 'voxpupuli'
12
12
steps :
13
- - uses : actions/checkout@v2
13
+ - uses : actions/checkout@v3
14
14
- name : Install Ruby 3.0
15
15
uses : ruby/setup-ruby@v1
16
16
with :
17
17
ruby-version : ' 3.0'
18
18
bundler : ' none'
19
+ env :
20
+ BUNDLE_WITHOUT : release:development:rubocop
19
21
- name : Build gem
20
- run : gem build *.gemspec
22
+ run : gem build --strict --verbose *.gemspec
21
23
- name : Publish gem to rubygems.org
22
24
run : gem push *.gem
23
25
env :
Original file line number Diff line number Diff line change 1
1
name : Test
2
2
3
3
on :
4
- - pull_request
5
- - push
4
+ pull_request : {}
5
+ push :
6
+ branches :
7
+ - master
8
+ - main
6
9
7
10
env :
8
11
BUNDLE_WITHOUT : release
9
12
10
13
jobs :
14
+ rubocop :
15
+ runs-on : ubuntu-latest
16
+ steps :
17
+ - uses : actions/checkout@v3
18
+ - name : Setup ruby
19
+ uses : ruby/setup-ruby@v1
20
+ with :
21
+ ruby-version : ' 3.0'
22
+ bundler-cache : true
23
+ - name : Run rake rubocop
24
+ run : bundle exec rake rubocop
11
25
test :
12
26
runs-on : ubuntu-latest
13
27
strategy :
14
28
fail-fast : false
15
29
matrix :
16
30
include :
17
- - ruby : " 2.4"
18
- - ruby : " 2.5"
19
- - ruby : " 2.6"
20
31
- ruby : " 2.7"
21
32
- ruby : " 3.0"
22
33
- ruby : " 3.1"
23
34
coverage : " yes"
35
+ - ruby : " 3.2"
24
36
env :
25
37
COVERAGE : ${{ matrix.coverage }}
26
38
name : Ruby ${{ matrix.ruby }}
27
39
steps :
28
- - uses : actions/checkout@v2
40
+ - uses : actions/checkout@v3
29
41
- name : Install Ruby ${{ matrix.ruby }}
30
42
uses : ruby/setup-ruby@v1
31
43
with :
34
46
- name : Run tests
35
47
run : bundle exec rake spec
36
48
- name : Verify gem builds
37
- run : gem build *.gemspec
49
+ run : gem build --strict --verbose *.gemspec
50
+ tests :
51
+ needs :
52
+ - rubocop
53
+ - test
54
+ runs-on : ubuntu-latest
55
+ name : Test suite
56
+ steps :
57
+ - run : echo Test suite completed
Original file line number Diff line number Diff line change
1
+ ---
2
+ # Managed by modulesync - DO NOT EDIT
3
+ # https://voxpupuli.org/docs/updating-files-managed-with-modulesync/
4
+
5
+ inherit_gem :
6
+ voxpupuli-rubocop : rubocop.yml
7
+
8
+ Naming/FileName :
9
+ Exclude :
10
+ - " *.gemspec"
Original file line number Diff line number Diff line change @@ -3,10 +3,19 @@ source ENV['GEM_SOURCE'] || 'https://rubygems.org'
3
3
gemspec
4
4
5
5
group :release do
6
- gem 'github_changelog_generator' , require : false
6
+ gem 'faraday-retry' , '~> 2.1' , require : false
7
+ gem 'github_changelog_generator' , '~> 1.16.4' , require : false
7
8
end
8
9
9
- group :coverage , optional : ENV [ 'COVERAGE' ] !='yes' do
10
- gem 'simplecov-console' , :require => false
11
- gem 'codecov' , :require => false
10
+ group :coverage , optional : ENV [ 'COVERAGE' ] != 'yes' do
11
+ gem 'codecov' , require : false
12
+ gem 'simplecov-console' , require : false
13
+ end
14
+
15
+ group :development do
16
+ gem 'rake' , '~> 13.0' , '>= 13.0.6'
17
+ gem 'rspec' , '~> 3.12'
18
+ gem 'rspec-collection_matchers' , '~> 1.2'
19
+ gem 'rspec-its' , '~> 1.3'
20
+ gem 'voxpupuli-rubocop' , '~> 1.1'
12
21
end
Original file line number Diff line number Diff line change @@ -7,13 +7,28 @@ task default: :spec
7
7
begin
8
8
require 'rubygems'
9
9
require 'github_changelog_generator/task'
10
-
10
+ rescue LoadError
11
+ # github-changelog-generator is an optional group
12
+ else
11
13
GitHubChangelogGenerator ::RakeTask . new :changelog do |config |
12
14
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 }
15
+ config . exclude_labels = %w[ duplicate question invalid wontfix wont-fix skip-changelog modulesync ]
14
16
config . user = 'voxpupuli'
15
17
config . project = 'puppet-lint-param-docs'
16
18
config . future_release = Gem ::Specification . load ( "#{ config . project } .gemspec" ) . version
17
19
end
20
+ end
21
+
22
+ begin
23
+ require 'rubocop/rake_task'
18
24
rescue LoadError
25
+ # RuboCop is an optional group
26
+ else
27
+ RuboCop ::RakeTask . new ( :rubocop ) do |task |
28
+ # These make the rubocop experience maybe slightly less terrible
29
+ task . options = [ '--display-cop-names' , '--display-style-guide' , '--extra-details' ]
30
+
31
+ # Use Rubocop's Github Actions formatter if possible
32
+ task . formatters << 'github' if ENV [ 'GITHUB_ACTIONS' ] == 'true'
33
+ end
19
34
end
You can’t perform that action at this time.
0 commit comments