Skip to content

Commit

Permalink
feat: workflows and renovate
Browse files Browse the repository at this point in the history
- Configure Renovate
- Pin lint-unit workflow to v0.1.1
- Configure Rubocop to use Chefstyle

Signed-off-by: Dan Webb <[email protected]>
  • Loading branch information
damacus committed Nov 27, 2023
1 parent e5973ff commit 6bba4d7
Show file tree
Hide file tree
Showing 8 changed files with 52 additions and 58 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
name: 'Test'

'on':
pull_request:

jobs:
lint-unit:
uses: test-kitchen/.github/.github/workflows/lint-unit.yml@main
6 changes: 3 additions & 3 deletions .github/workflows/linters.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
name: 'Test'
name: "Test"

'on':
"on":
pull_request:

jobs:
lint-unit:
uses: test-kitchen/.github/.github/workflows/lint-unit.yml@main
uses: test-kitchen/.github/.github/workflows/lint-unit.yml@v0.1.1
7 changes: 5 additions & 2 deletions .markdownlint.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
---
MD012: false
default: true

Check warning on line 1 in .markdownlint.yaml

View workflow job for this annotation

GitHub Actions / lint-unit / yamllint

1:1 [document-start] missing document start "---"

Check warning on line 1 in .markdownlint.yaml

View workflow job for this annotation

GitHub Actions / lint-unit / yamllint

1:1 [document-start] missing document start "---"
MD013: false
MD024: false
MD026: false
MD036: false
MD012: false
MD029: false
MD004: false
37 changes: 10 additions & 27 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,10 @@
---
Documentation:
Enabled: false

Semicolon:
Enabled: false

Metrics/MethodLength:
Enabled: false

Metrics/AbcSize:
Enabled: false

Metrics/BlockLength:
Enabled: false

Metrics/PerceivedComplexity:
Enabled: false

Metrics/CyclomaticComplexity:
Enabled: false

Metrics/LineLength:
Enabled: false

Metrics/ClassLength:
Enabled: false
require:

Check warning on line 1 in .rubocop.yml

View workflow job for this annotation

GitHub Actions / lint-unit / yamllint

1:1 [document-start] missing document start "---"

Check warning on line 1 in .rubocop.yml

View workflow job for this annotation

GitHub Actions / lint-unit / yamllint

1:1 [document-start] missing document start "---"
- chefstyle

AllCops:
TargetRubyVersion: 3.1
Include:
- "**/*.rb"
Exclude:
- "vendor/**/*"
- "spec/**/*"
16 changes: 14 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
source "https://rubygems.org"

# Specify your gem's dependencies in kitchen-digitalocean.gemspec
gemspec

# vim: ai et ts=2 sts=2 sw=2 ft=ruby
group :development do
gem "webmock", "~> 3.5"
end

group :test do
gem 'bundler'
gem 'rake'
gem 'rspec', '~> 3.2'
end


group :chefstyle do
gem "chefstyle", "2.2.3"
end
17 changes: 3 additions & 14 deletions kitchen-digitalocean.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ require "kitchen/driver/digitalocean_version"
Gem::Specification.new do |spec|
spec.name = "kitchen-digitalocean"
spec.version = Kitchen::Driver::DIGITALOCEAN_VERSION
spec.authors = ["Greg Fitzgerald"]
spec.email = ["greg@gregf.org"]
spec.authors = ["Test Kitchen Team"]
spec.email = ["help@sous-chefs.org"]
spec.description = "A Test Kitchen Driver for Digital Ocean"
spec.summary = spec.description
spec.homepage = "https://github.com/test-kitchen/kitchen-digitalocean"
Expand All @@ -15,19 +15,8 @@ Gem::Specification.new do |spec|
spec.files = `git ls-files`.split($INPUT_RECORD_SEPARATOR).grep(/LICENSE|^lib/)
spec.require_paths = ["lib"]

spec.required_ruby_version = ">= 2.7"
spec.required_ruby_version = ">= 3.0"

spec.add_dependency "droplet_kit", ">= 3.7", "< 4.0"
spec.add_dependency "test-kitchen", ">= 1.17", "< 4"

spec.add_development_dependency "countloc", "~> 0.4"
spec.add_development_dependency "coveralls", "~> 0.8"
spec.add_development_dependency "rake"
spec.add_development_dependency "rspec", "~> 3.8"
spec.add_development_dependency "chefstyle", "= 2.2.3"
spec.add_development_dependency "simplecov", "~> 0.9"
spec.add_development_dependency "simplecov-console", "~> 0.2"
spec.add_development_dependency "webmock", "~> 3.5"
end

# vim: ai et ts=2 sts=2 sw=2 ft=ruby
8 changes: 8 additions & 0 deletions renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:recommended",
":disableDependencyDashboard",
"schedule:automergeEarlyMondays"
]
}
10 changes: 0 additions & 10 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,6 @@

require "rspec"
require "webmock/rspec"
require "simplecov"
require "simplecov-console"
require "coveralls"

SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new([
Coveralls::SimpleCov::Formatter,
SimpleCov::Formatter::HTMLFormatter,
SimpleCov::Formatter::Console,
])
SimpleCov.start

WebMock.disable_net_connect!(allow_localhost: true)

Expand Down

0 comments on commit 6bba4d7

Please sign in to comment.