Skip to content

Commit 49fa655

Browse files
authored
add linters and publish gem action (#106)
1 parent 8badf42 commit 49fa655

File tree

6 files changed

+87
-19
lines changed

6 files changed

+87
-19
lines changed

.github/dependabot.yml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1+
---
12
version: 2
23
updates:
3-
- package-ecosystem: bundler
4-
directory: "/"
5-
schedule:
6-
interval: daily
7-
open-pull-requests-limit: 10
8-
ignore:
9-
- dependency-name: github_changelog_generator
10-
versions:
11-
- 1.16.0
4+
- package-ecosystem: bundler
5+
directory: "/"
6+
schedule:
7+
interval: daily
8+
open-pull-requests-limit: 10
9+
ignore:
10+
- dependency-name: github_changelog_generator
11+
versions:
12+
- 1.16.0

.github/workflows/linters.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
name: linters
3+
4+
'on':
5+
pull_request:
6+
push:
7+
branches:
8+
- main
9+
10+
jobs:
11+
yamllint:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Check out code
15+
uses: actions/checkout@master
16+
- name: Lint YAML
17+
uses: koozz/yamllint-action@main
18+
chefstyle:
19+
env:
20+
BUNDLE_WITHOUT: integration
21+
runs-on: ubuntu-latest
22+
strategy:
23+
matrix:
24+
ruby: ['2.7']
25+
name: Chefstyle on Ruby ${{ matrix.ruby }}
26+
steps:
27+
- uses: actions/checkout@v2
28+
- uses: ruby/setup-ruby@v1
29+
with:
30+
ruby-version: ${{ matrix.ruby }}
31+
bundler-cache: true
32+
- uses: r7kamura/rubocop-problem-matchers-action@v1
33+
- run: bundle exec chefstyle
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
'on':
3+
push:
4+
branches:
5+
- main
6+
7+
name: release-please
8+
jobs:
9+
release-please:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: google-github-actions/release-please-action@v3
13+
with:
14+
release-type: ruby
15+
package-name: kitchen-hyperv
16+
version-file: lib/kitchen/driver/hyperv_version.rb

.github/workflows/publish.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
name: Publish
3+
4+
'on':
5+
release:
6+
types: [published]
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
- name: Build and publish gem
14+
uses: jstastny/publish-gem-to-github@master
15+
with:
16+
token: ${{ secrets.GITHUB_TOKEN }}
17+
owner: ${{ secrets.OWNER }}
Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
name: CI
1+
---
2+
name: Unit
23

3-
on:
4+
'on':
45
pull_request:
56
push:
67
branches:
@@ -11,12 +12,12 @@ jobs:
1112
runs-on: ubuntu-latest
1213
strategy:
1314
matrix:
14-
ruby: [ '2.6', '2.7', '3.0', '3.1' ]
15-
name: Lint & Test with Ruby ${{ matrix.ruby }}
15+
ruby: ['2.7', '3.0', '3.1']
16+
name: Unit Test with Ruby ${{ matrix.ruby }}
1617
steps:
1718
- uses: actions/checkout@v2
1819
- uses: ruby/setup-ruby@v1
1920
with:
2021
ruby-version: ${{ matrix.ruby }}
2122
bundler-cache: true
22-
- run: bundle exec rake
23+
- run: bundle exec rake test

.rubocop.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
Layout/LineLength:
2-
Max: 100
3-
4-
Style/Documentation:
5-
Enabled: false
1+
Layout/LineLength:
2+
Max: 100
3+
4+
Style/Documentation:
5+
Enabled: false

0 commit comments

Comments
 (0)