summaryrefslogtreecommitdiff
path: root/.github/workflows/lint.yml
blob: 80bb153de69af1d747b44729e707fe2d07e08d39 (plain)
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
---
name: lint

"on":
  pull_request:
  push:
    branches:
      - main

jobs:
  chefstyle:
    runs-on: ubuntu-latest
    env:
      BUNDLE_WITHOUT: ruby_shadow:omnibus_package
    steps:
    - uses: actions/checkout@v2
    - uses: ruby/setup-ruby@v1
      with:
        ruby-version: 3.1
        bundler-cache: false
    - uses: r7kamura/rubocop-problem-matchers-action@v1  # this shows the failures in the PR
    - run: |
        gem install chefstyle
        chefstyle -c .rubocop.yml

  spellcheck:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: carlosperate/download-file-action@v2.0.0
        id: download-custom-dictionary
        with:
          file-url: 'https://raw.githubusercontent.com/chef/chef_dictionary/main/chef.txt'
          file-name: 'chef_dictionary.txt'
      - uses: streetsidesoftware/cspell-action@v2.12.0