-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: Add Renovate & update workflows (#5)
- Update workflows - Give them nice names! - Add with and without bundler options Signed-off-by: Dan Webb <dan.webb@damacus.io>
- Loading branch information
Showing
3 changed files
with
66 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,54 +1,81 @@ | ||
name: Lint & Unit test | ||
|
||
'on': | ||
"on": | ||
workflow_call: | ||
inputs: | ||
bundle_with: | ||
description: "Bundle with option for Cookstyle, chose the bundler group that Cookstyle is in" | ||
type: "string" | ||
required: false | ||
default: "cookstyle" | ||
bundle_without: | ||
description: "Bundle without the listed groups of Gems" | ||
type: string | ||
required: false | ||
default: "development" | ||
|
||
jobs: | ||
chefstyle: | ||
env: | ||
BUNDLE_WITHOUT: integration | ||
BUNDLE_WITH: ${{ inputs.bundle_with }} | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
ruby: ['3.1'] | ||
ruby: ["3.2"] | ||
name: Chefstyle on Ruby ${{ matrix.ruby }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ruby/setup-ruby@v1.161.0 | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Ruby | ||
uses: ruby/setup-ruby@v1.161.0 | ||
with: | ||
ruby-version: ${{ matrix.ruby }} | ||
bundler-cache: true | ||
|
||
- uses: r7kamura/rubocop-problem-matchers-action@v1 | ||
- run: bundle exec chefstyle | ||
|
||
- name: Chef Style | ||
run: bundle exec chefstyle | ||
|
||
yamllint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out code | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Run yaml Lint | ||
uses: actionshub/yamllint@main | ||
|
||
mdl: | ||
markdown-lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out code | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- uses: DavidAnson/markdownlint-cli2-action@v13 | ||
|
||
- name: Markdown lint | ||
uses: DavidAnson/markdownlint-cli2-action@v13 | ||
with: | ||
globs: "**/*.md" | ||
|
||
test: | ||
name: Unit Test with Ruby ${{ matrix.ruby }} | ||
runs-on: ubuntu-latest | ||
needs: [mdl, yamllint, chefstyle] | ||
needs: [markdown-lint, yamllint, chefstyle] | ||
env: | ||
BUNDLE_WITHOUT: ${{ inputs.bundle_without }} | ||
strategy: | ||
matrix: | ||
ruby: ['2.7', '3.0', '3.1'] | ||
ruby: ["3.0", "3.1", "3.2"] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ruby/setup-ruby@v1.161.0 | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Ruby | ||
uses: ruby/setup-ruby@v1.161.0 | ||
with: | ||
ruby-version: ${{ matrix.ruby }} | ||
bundler-cache: true | ||
- run: bundle exec rake test | ||
|
||
- name: Rake Test | ||
run: bundle exec rake test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Reusable Workflows | ||
|
||
## Lint and Unit Test | ||
|
||
- `.github/workflows/lint-unit.yml` | ||
|
||
## Usage | ||
|
||
Include the following in your workflow: | ||
|
||
```yaml | ||
jobs: | ||
lint-unit: | ||
uses: test-kitchen/.github/.github/workflows/lint-unit.yml@main | ||
with: | ||
bundle_with: "cookstyle" | ||
bundle_without: "development" | ||
``` | ||
The options above are the default values, so you can omit them if you want. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"$schema": "https://docs.renovatebot.com/renovate-schema.json", | ||
"extends": ["config:recommended", "schedule:automergeEarlyMondays"] | ||
} |