Skip to content

Commit

Permalink
add linters and publish gem action (#106)
Browse files Browse the repository at this point in the history
  • Loading branch information
kasif-adnan authored Apr 13, 2022
1 parent 8badf42 commit 49fa655
Show file tree
Hide file tree
Showing 6 changed files with 87 additions and 19 deletions.
19 changes: 10 additions & 9 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
---
version: 2
updates:
- package-ecosystem: bundler
directory: "/"
schedule:
interval: daily
open-pull-requests-limit: 10
ignore:
- dependency-name: github_changelog_generator
versions:
- 1.16.0
- package-ecosystem: bundler
directory: "/"
schedule:
interval: daily
open-pull-requests-limit: 10
ignore:
- dependency-name: github_changelog_generator
versions:
- 1.16.0
33 changes: 33 additions & 0 deletions .github/workflows/linters.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
name: linters

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

jobs:
yamllint:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@master
- name: Lint YAML
uses: koozz/yamllint-action@main
chefstyle:
env:
BUNDLE_WITHOUT: integration
runs-on: ubuntu-latest
strategy:
matrix:
ruby: ['2.7']
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 chefstyle
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-hyperv
version-file: lib/kitchen/driver/hyperv_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 }}
11 changes: 6 additions & 5 deletions .github/workflows/ci.yml → .github/workflows/unit.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: CI
---
name: Unit

on:
'on':
pull_request:
push:
branches:
Expand All @@ -11,12 +12,12 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
ruby: [ '2.6', '2.7', '3.0', '3.1' ]
name: Lint & Test with Ruby ${{ matrix.ruby }}
ruby: ['2.7', '3.0', '3.1']
name: Unit Test with 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
- run: bundle exec rake test
10 changes: 5 additions & 5 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Layout/LineLength:
Max: 100

Style/Documentation:
Enabled: false
Layout/LineLength:
Max: 100

Style/Documentation:
Enabled: false

0 comments on commit 49fa655

Please sign in to comment.