Skip to content

Commit

Permalink
fix: release please (#24)
Browse files Browse the repository at this point in the history
* fix: release please for latest version changes

Signed-off-by: Corey Hemminger <hemminger@hotmail.com>
  • Loading branch information
Stromweld committed Jun 18, 2024
1 parent 75ca2b6 commit 5e1f39e
Show file tree
Hide file tree
Showing 10 changed files with 96 additions and 36 deletions.
30 changes: 0 additions & 30 deletions .github/workflows/ci.yaml

This file was deleted.

9 changes: 9 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
name: Lint & Unit

"on":
pull_request:

jobs:
lint-unit:
uses: test-kitchen/.github/.github/workflows/lint-unit.yml@main
5 changes: 1 addition & 4 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,9 @@ jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v3.7.13
- uses: google-github-actions/release-please-action@v4
id: release
with:
release-type: ruby
package-name: workflow-testing-gem
version-file: lib/kitchen/driver/version.rb
token: ${{ secrets.PORTER_GITHUB_TOKEN }}

- name: Checkout
Expand Down
3 changes: 3 additions & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
".": "1.0.7"
}
1 change: 0 additions & 1 deletion .rubocop.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
require: [chefstyle]

AllCops:
TargetRubyVersion: 3.2
Include:
- "**/*.rb"
Exclude:
Expand Down
8 changes: 7 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ source "https://rubygems.org"

gemspec

group :test do
gem "bundler"
gem "rake"
gem "rspec", ">= 3.2"
end

group :chefstyle do
gem "chefstyle", "2.2.3"
gem "chefstyle", ">= 2.2.3"
end
16 changes: 16 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
require "bundler/gem_tasks"
require "rspec/core/rake_task"

begin
require "chefstyle"
require "rubocop/rake_task"
RuboCop::RakeTask.new(:style) do |task|
task.options += ["--display-cop-names", "--no-color"]
end
rescue LoadError
puts "chefstyle is not available. (sudo) gem install chefstyle to do style checking."
end

RSpec::Core::RakeTask.new(:test)

task default: %i{test style}
12 changes: 12 additions & 0 deletions release-please-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"packages": {
".": {
"package-name": "workflow-testing-gem",
"changelog-path": "CHANGELOG.md",
"release-type": "ruby",
"include-component-in-tag": false,
"version-file": "lib/kitchen/driver/version.rb"
}
},
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json"
}
17 changes: 17 additions & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#
# Author:: Chef Partner Engineering (<partnereng@chef.io>)
# Copyright:: Copyright (c) 2015 Chef Software, Inc.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
31 changes: 31 additions & 0 deletions spec/version_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#
# Authors:: Chef Partner Engineering (<partnereng@chef.io>)
# Copyright:: Copyright (c) 2015 Chef Software, Inc.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

require "spec_helper"
require "kitchen/driver/version"

describe Kitchen::Driver::WORKFLOW_TESTING_VERSION do
it "exists" do
expect(defined?(Kitchen::Driver::WORKFLOW_TESTING_VERSION)).to be_truthy
end

it "compares versions correctly" do
version_1 = Kitchen::Driver::WORKFLOW_TESTING_VERSION
version_2 = Kitchen::Driver::WORKFLOW_TESTING_VERSION
expect(version_1).to eq(version_2)
end
end

0 comments on commit 5e1f39e

Please sign in to comment.