Skip to content

Commit

Permalink
Add github action to format yaml files
Browse files Browse the repository at this point in the history
Signed-off-by: hansinikarunarathne <107214435+hansinikarunarathne@users.noreply.github.com>
  • Loading branch information
hansinikarunarathne committed Jun 29, 2024
1 parent e004a46 commit 07dc03e
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/python_formatter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: psf/black@stable

15 changes: 15 additions & 0 deletions .github/workflows/yaml_formatter.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Proper Formatting on Yaml files

on: [push, pull_request]

jobs:
format_python_files:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Install yamllint
run: pip install yamllint

- name: Lint YAML files
run: yamllint .
12 changes: 12 additions & 0 deletions .yamllint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# It extends the default conf by adjusting some options.
extends: default

rules:
document-start:
present: false
document-end:
present: false
indentation:
indent-sequences: false
line-length:
max: 400

Check failure on line 12 in .yamllint.yaml

View workflow job for this annotation

GitHub Actions / format_python_files

12:13 [new-line-at-end-of-file] no new line character at the end of file

0 comments on commit 07dc03e

Please sign in to comment.