Skip to content

Commit

Permalink
[CI] Add YAML linter
Browse files Browse the repository at this point in the history
  • Loading branch information
aobolensk committed Feb 2, 2025
1 parent f8be9b8 commit 33b6f38
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/yaml-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: YAML Lint

Check warning on line 1 in .github/workflows/yaml-lint.yml

View workflow job for this annotation

GitHub Actions / Validate YAML files

1:1 [document-start] missing document start "---"

Check warning on line 1 in .github/workflows/yaml-lint.yml

View workflow job for this annotation

GitHub Actions / Validate YAML files

1:1 [document-start] missing document start "---"

on:
pull_request:
paths:
- "**/*.yml"
- "**/*.yaml"
push:
paths:
- "**/*.yml"
- "**/*.yaml"
workflow_dispatch:

jobs:
yaml-lint:
name: Validate YAML files
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install yamllint
run: python3 -m pip install yamllint
- name: Run yamllint
run: python3 -m yamllint .
5 changes: 5 additions & 0 deletions .yamllint
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
extends: default

Check warning on line 1 in .yamllint

View workflow job for this annotation

GitHub Actions / Validate YAML files

1:1 [document-start] missing document start "---"

Check warning on line 1 in .yamllint

View workflow job for this annotation

GitHub Actions / Validate YAML files

1:1 [document-start] missing document start "---"
rules:
line-length:
max: 120
level: error

0 comments on commit 33b6f38

Please sign in to comment.