forked from test-kitchen/test-kitchen
-
Notifications
You must be signed in to change notification settings - Fork 0
76 lines (68 loc) · 1.76 KB
/
lint.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
---
name: lint
"on":
pull_request:
push:
branches:
- main
concurrency:
group: lint-${{ github.ref }}
cancel-in-progress: true
jobs:
chefstyle:
env:
BUNDLE_WITH: ${{ inputs.bundle_with }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ruby: ["3.3"]
name: Chefstyle on Ruby
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Check for Gemfile
id: check
run: |
if [ -f Gemfile ]; then
echo "gemfile=true" >> $GITHUB_OUTPUT
else
echo "gemfile=false" >> $GITHUB_OUTPUT
fi
- name: Setup Ruby
if: steps.check.outputs.gemfile == 'true'
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- uses: r7kamura/rubocop-problem-matchers-action@v1
if: steps.check.outputs.gemfile == 'true'
- name: Chef Style
if: steps.check.outputs.gemfile == 'true'
run: bundle exec chefstyle
yamllint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Run yaml Lint
uses: actionshub/yamllint@main
markdown-lint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Markdown lint
uses: DavidAnson/markdownlint-cli2-action@v16
with:
globs: "**/*.md"
markdown-link-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: gaurav-nelson/[email protected]
with:
use-quiet-mode: "yes"
use-verbose-mode: "yes"
check-modified-files-only: "yes"
base-branch: "main"