Skip to content

Commit cbaa846

Browse files
committed
modulesync 2023-04-21
1 parent 675ca08 commit cbaa846

File tree

6 files changed

+88
-15
lines changed

6 files changed

+88
-15
lines changed

.github/dependabot.yml

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
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

.github/workflows/release.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,16 @@ jobs:
1010
runs-on: ubuntu-latest
1111
if: github.repository_owner == 'voxpupuli'
1212
steps:
13-
- uses: actions/checkout@v2
13+
- uses: actions/checkout@v3
1414
- name: Install Ruby 3.0
1515
uses: ruby/setup-ruby@v1
1616
with:
1717
ruby-version: '3.0'
1818
bundler: 'none'
19+
env:
20+
BUNDLE_WITHOUT: release:development:rubocop
1921
- name: Build gem
20-
run: gem build *.gemspec
22+
run: gem build --strict --verbose *.gemspec
2123
- name: Publish gem to rubygems.org
2224
run: gem push *.gem
2325
env:

.github/workflows/test.yml

+27-7
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,43 @@
11
name: Test
22

33
on:
4-
- pull_request
5-
- push
4+
pull_request: {}
5+
push:
6+
branches:
7+
- master
8+
- main
69

710
env:
811
BUNDLE_WITHOUT: release
912

1013
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
1125
test:
1226
runs-on: ubuntu-latest
1327
strategy:
1428
fail-fast: false
1529
matrix:
1630
include:
17-
- ruby: "2.4"
18-
- ruby: "2.5"
19-
- ruby: "2.6"
2031
- ruby: "2.7"
2132
- ruby: "3.0"
2233
- ruby: "3.1"
2334
coverage: "yes"
35+
- ruby: "3.2"
2436
env:
2537
COVERAGE: ${{ matrix.coverage }}
2638
name: Ruby ${{ matrix.ruby }}
2739
steps:
28-
- uses: actions/checkout@v2
40+
- uses: actions/checkout@v3
2941
- name: Install Ruby ${{ matrix.ruby }}
3042
uses: ruby/setup-ruby@v1
3143
with:
@@ -34,4 +46,12 @@ jobs:
3446
- name: Run tests
3547
run: bundle exec rake spec
3648
- 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

.rubocop.yml

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
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"

Gemfile

+13-4
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,19 @@ source ENV['GEM_SOURCE'] || 'https://rubygems.org'
33
gemspec
44

55
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
78
end
89

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'
1221
end

Rakefile

+17-2
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,28 @@ task default: :spec
77
begin
88
require 'rubygems'
99
require 'github_changelog_generator/task'
10-
10+
rescue LoadError
11+
# github-changelog-generator is an optional group
12+
else
1113
GitHubChangelogGenerator::RakeTask.new :changelog do |config|
1214
config.header = "# Changelog\n\nAll 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]
1416
config.user = 'voxpupuli'
1517
config.project = 'puppet-lint-param-docs'
1618
config.future_release = Gem::Specification.load("#{config.project}.gemspec").version
1719
end
20+
end
21+
22+
begin
23+
require 'rubocop/rake_task'
1824
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
1934
end

0 commit comments

Comments
 (0)