-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Renovate, Gemfile, and Rakefile standard fixes Add publish and lint-unit workflows Signed-off-by: Dan Webb <[email protected]>
- Loading branch information
Showing
13 changed files
with
143 additions
and
115 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
name: "Lint, Unit & Integration Tests" | ||
|
||
"on": | ||
pull_request: | ||
|
||
jobs: | ||
lint-unit: | ||
uses: test-kitchen/.github/.github/workflows/[email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
--- | ||
name: release-please | ||
|
||
"on": | ||
push: | ||
branches: [main] | ||
|
||
jobs: | ||
release-please: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: google-github-actions/release-please-action@v3 | ||
id: release | ||
with: | ||
release-type: ruby | ||
package-name: kitchen-dsc | ||
version-file: lib/kitchen-dsc/version.rb | ||
token: ${{ secrets.PORTER_GITHUB_TOKEN }} | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
if: ${{ steps.release.outputs.release_created }} | ||
|
||
- name: Build and publish to GitHub Package | ||
uses: actionshub/publish-gem-to-github@main | ||
if: ${{ steps.release.outputs.release_created }} | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
owner: ${{ secrets.OWNER }} | ||
|
||
- name: Build and publish to RubyGems | ||
uses: actionshub/publish-gem-to-rubygems@main | ||
if: ${{ steps.release.outputs.release_created }} | ||
with: | ||
token: ${{ secrets.RUBYGEMS_API_KEY }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,6 @@ Gemfile.lock | |
*.gem | ||
.bundle | ||
.config | ||
.rubocop.yml | ||
coverage | ||
InstalledFiles | ||
lib/bundler/man | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
default: true | ||
MD013: false | ||
MD024: false | ||
MD026: false | ||
MD036: false | ||
MD012: false | ||
MD029: false | ||
MD004: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
require: | ||
- chefstyle | ||
|
||
AllCops: | ||
TargetRubyVersion: 3.1 | ||
Include: | ||
- "**/*.rb" | ||
Exclude: | ||
- "vendor/**/*" | ||
- "spec/**/*" |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,24 @@ | ||
source "https://rubygems.org" | ||
|
||
# Specify your gem's dependencies in kitchen-dsc.gemspec | ||
gemspec | ||
|
||
gem "github_changelog_generator" | ||
group :development do | ||
gem "countloc", "~> 0.4" | ||
gem "rake" | ||
gem "rspec", "~> 3.2" | ||
gem "yard", "~> 0.8" | ||
gem "pry" | ||
gem "pry-stack_explorer" | ||
gem "pry-byebug" | ||
gem "rb-readline" | ||
gem "cane", "3.0.0" | ||
end | ||
|
||
group :test do | ||
gem "simplecov", "~> 0.9" | ||
gem "minitest", "~> 5.3" | ||
end | ||
|
||
group :chefstyle do | ||
gem "chefstyle", "2.2.3" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,9 @@ | ||
require "bundler/gem_tasks" | ||
|
||
require "rake/testtask" | ||
Rake::TestTask.new(:unit) do |t| | ||
t.libs.push "lib" | ||
t.test_files = FileList["spec/**/*_spec.rb"] | ||
t.verbose = true | ||
end | ||
|
||
require "rubocop/rake_task" | ||
require "chefstyle" | ||
require "rubocop/rake_task" | ||
|
||
desc "Run RuboCop on the lib directory" | ||
RuboCop::RakeTask.new(:rubocop) do |task| | ||
task.patterns = ["lib/**/*.rb"] | ||
# don't abort rake on failure | ||
task.fail_on_error = false | ||
RuboCop::RakeTask.new(:style) do |task| | ||
task.options += ["--display-cop-names", "--no-color"] | ||
end | ||
|
||
desc "Run all test suites" | ||
task test: [:unit, :rubocop] | ||
|
||
task default: [:test] | ||
|
||
begin | ||
require "github_changelog_generator/task" | ||
require "kitchen-dsc/version" | ||
|
||
GitHubChangelogGenerator::RakeTask.new :changelog do |config| | ||
config.future_release = "v#{Kitchen::Dsc::VERSION}" | ||
config.issues = false | ||
config.pulls = true | ||
config.user = "test-kitchen" | ||
config.project = "kitchen-dsc" | ||
end | ||
rescue LoadError | ||
puts "github_changelog_generator is not available. " \ | ||
"gem install github_changelog_generator to generate changelogs" | ||
end | ||
task default: %i{style} |
Oops, something went wrong.