-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: Initial pass at linting YAML files (#979)
Co-authored-by: Cody J. Hanson <[email protected]>
- Loading branch information
1 parent
72ec44e
commit 32a2850
Showing
5 changed files
with
68 additions
and
1 deletion.
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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
lint: | ||
name: Lint YAML files | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Get changed files in the docs folder | ||
id: changed-files | ||
uses: tj-actions/changed-files@v34 | ||
with: | ||
files: | | ||
_data/**/*.yml | ||
- name: Install yamllint | ||
if: steps.changed-files.outputs.any_changed == 'true' | ||
run: pipx install yamllint | ||
|
||
- name: Lint YAML files | ||
if: steps.changed-files.outputs.any_changed == 'true' | ||
run: yamllint ${{ steps.changed-files.outputs.all_changed_files }} |
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,7 @@ | ||
# Update the rev variable with the release version that you want, from the yamllint repo | ||
# You can pass your custom .yamllint with args attribute. | ||
repos: | ||
- repo: https://github.com/adrienverge/yamllint.git | ||
rev: v1.28.0 | ||
hooks: | ||
- id: yamllint |
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 |
---|---|---|
|
@@ -5,4 +5,6 @@ src/.temp | |
_data | ||
assets | ||
schemas | ||
singer | ||
singer | ||
.pre-commit-config.yaml | ||
.yamllint.yaml |
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,16 @@ | ||
extends: default | ||
|
||
ignore: | | ||
.pre-commit-config.yaml | ||
rules: | ||
braces: | ||
forbid: non-empty | ||
document-start: | ||
present: false # Don't require `---` at the start of the file | ||
indentation: | ||
indent-sequences: false | ||
spaces: 2 | ||
key-ordering: enable | ||
line-length: | ||
max: 160 |
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