Skip to content

Commit 9a0ac3c

Browse files
committed
ci: add YAML linting to GitHub Actions workflow
- Install yamllint in the lint job - Add yaml linting step using .yamllint-ci.yml configuration - Ensure YAML files follow consistent formatting standards - Fix PATH issues in Perl dependency installation - Add yamllint configuration file for CI
1 parent 35ae05e commit 9a0ac3c

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-1
lines changed

.github/copilot-instructions.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,4 +91,5 @@ ALWAYS run the linting suite before committing any changes:
9191

9292
```bash
9393
markdownlint "**/*.md"
94+
yamllint -c .yamllint-ci.yml .
9495
```

.github/workflows/testing.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,14 @@ jobs:
1818
- name: Install dependencies
1919
run: |
2020
sudo apt-get update
21+
sudo apt-get install -y yamllint
2122
sudo npm install -g markdownlint-cli
2223
23-
- name: Run linting
24+
- name: Run markdown linting
2425
run: markdownlint "**/*.md"
2526

27+
- name: Run yaml linting
28+
run: yamllint -c .yamllint-ci.yml .
2629
test:
2730
runs-on: ubuntu-latest
2831
name: Test

.yamllint-ci.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
extends: default
2+
3+
rules:
4+
line-length:
5+
max: 120 # More reasonable for infrastructure code
6+
comments:
7+
min-spaces-from-content: 1 # Allow single space before comments
8+
document-start: disable # Cloud-init files don't need --- start
9+
truthy:
10+
allowed-values: ["true", "false", "yes", "no", "on", "off"] # Allow cloud-init and GitHub Actions common values

0 commit comments

Comments
 (0)