From 3c00514521da9fc5bca4bc6cab40e799f4fcac9f Mon Sep 17 00:00:00 2001 From: Mostafa Ghadimi Date: Sat, 6 Apr 2024 14:01:16 +0330 Subject: [PATCH] :construction_worker: feat(CI): add yaml lint to the CI (#3) * :construction_worker: feat(CI): add yaml lint to the CI * :alembic: test: check the functionality of yaml linter * :alembic: test: remove empty line * :green_heart: refactor: trigger the CI on push on main branch * :wrench: feat: add configuration for yamllint --- .github/workflows/yaml_lint.yaml | 32 ++++++++++++++++++++++++++++++++ .yamllint | 4 ++++ 2 files changed, 36 insertions(+) create mode 100644 .github/workflows/yaml_lint.yaml create mode 100644 .yamllint diff --git a/.github/workflows/yaml_lint.yaml b/.github/workflows/yaml_lint.yaml new file mode 100644 index 0000000..7dcfd17 --- /dev/null +++ b/.github/workflows/yaml_lint.yaml @@ -0,0 +1,32 @@ +name: YAML Format Check + +on: + push: + branches: + - main + paths: + - 'roadmap.yaml' + pull_request: + branches: + - '**' + paths: + - 'roadmap.yaml' + +jobs: + yaml-lint: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set up Python + uses: actions/setup-python@v3 + with: + python-version: '3.x' + + - name: Install yamllint + run: pip install yamllint + + - name: Run yamllint + run: yamllint roadmap.yaml + diff --git a/.yamllint b/.yamllint new file mode 100644 index 0000000..36bcc01 --- /dev/null +++ b/.yamllint @@ -0,0 +1,4 @@ +rules: + empty-lines: + max: 1 +