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

add linters and publish action #222

Closed
wants to merge 3 commits into from
Closed
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
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@test-kitchen/maintainers
11 changes: 6 additions & 5 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
---
version: 2
updates:
- package-ecosystem: bundler
directory: "/"
schedule:
interval: daily
open-pull-requests-limit: 10
- package-ecosystem: bundler
directory: "/"
schedule:
interval: daily
open-pull-requests-limit: 10
22 changes: 0 additions & 22 deletions .github/workflows/ci.yml

This file was deleted.

45 changes: 45 additions & 0 deletions .github/workflows/linters.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---
name: linters

'on':
pull_request:
push:
branches:
- main

jobs:
yamllint:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@main
- name: Run yaml Lint
uses: actionshub/yamllint@main
chefstyle:
runs-on: ubuntu-latest
strategy:
matrix:
ruby: ['2.7', '3.0', '3.1']
name: Chefstyle on Ruby ${{ matrix.ruby }}
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- uses: r7kamura/rubocop-problem-matchers-action@v1
- run: bundle exec rake style
unit-test:
runs-on: ubuntu-latest
needs: [yamllint, chefstyle]
strategy:
matrix:
ruby: ['2.7', '3.0', '3.1']
name: Unit Tests on Ruby ${{ matrix.ruby }}
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- run: bundle exec rake test
16 changes: 16 additions & 0 deletions .github/workflows/please-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
'on':
push:
branches:
- main

name: release-please
jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v3
with:
release-type: ruby
package-name: kitchen-openstack
version-file: lib/kitchen/driver/openstack_version.rb
17 changes: 17 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
name: Publish

'on':
release:
types: [published]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build and publish gem
uses: jstastny/publish-gem-to-github@master
with:
token: ${{ secrets.GITHUB_TOKEN }}
owner: ${{ secrets.OWNER }}
2 changes: 1 addition & 1 deletion kitchen-openstack.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Gem::Specification.new do |spec|
spec.files = Dir["LICENSE", "README.md", "lib/**/*"]
spec.require_paths = ["lib"]

spec.required_ruby_version = ">= 2.6.0"
spec.required_ruby_version = ">= 2.7.0"

spec.add_dependency "test-kitchen", ">= 1.4.1", "< 4"
spec.add_dependency "fog-openstack", "~> 1.0"
Expand Down
Loading