Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: release please #24

Merged
merged 12 commits into from
Jun 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 (<[email protected]>)
# 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 (<[email protected]>)
# 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