Skip to content

Commit

Permalink
feat: workflows and renovate (#116)
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 <dan.webb@damacus.io>
  • Loading branch information
damacus authored Nov 27, 2023
1 parent e5973ff commit 9e43551
Show file tree
Hide file tree
Showing 8 changed files with 45 additions and 64 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@v0.1.1
9 changes: 0 additions & 9 deletions .github/workflows/linters.yml

This file was deleted.

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
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:
- chefstyle

AllCops:
TargetRubyVersion: 3.1
Include:
- "**/*.rb"
Exclude:
- "vendor/**/*"
- "spec/**/*"
12 changes: 10 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
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 :test do
gem 'bundler'
gem 'rake'
gem 'rspec', '~> 3.2'
gem "webmock", "~> 3.5"
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 9e43551

Please sign in to comment.