Skip to content

Commit 5511f9c

Browse files
authored
Add YAML linting checks to CI (hellt#20)
* Fix cicd.yml long lines and inline ignore truthy * Update pyproject.toml with project info * Add uv.lock * Add .yamllint config * Add yamllint Action to cicd.yml * Add yamllint to goals comment in cicd.yml * Rename yamllint config with file extension * Revert "Add uv.lock" This reverts commit ada48ef. * Remove all packaging except for tool.ruff * Update cicd.yml - fix indenting * Update cicd.yml - remove trailing spaces
1 parent e2938e1 commit 5511f9c

File tree

3 files changed

+32
-11
lines changed

3 files changed

+32
-11
lines changed

.github/workflows/cicd.yml

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1+
---
12
name: Test, Build, and Push Docker Image
23

3-
on:
4+
on: # yamllint disable-line rule:truthy
45
push:
56
branches: ["main"]
67
tags:
@@ -12,11 +13,11 @@ on:
1213

1314
# GOAL:
1415
# on pushes to main branch or v* tag
15-
# - ruff, mdlint, test
16+
# - ruff, mdlint, yamllint, test
1617
# on PRs against main branch
17-
# - ruff, mdlint, test
18+
# - ruff, mdlint, yamllint, test
1819
# on Release creation
19-
# - ruff, mdlint, test
20+
# - ruff, mdlint, yamllint, test
2021
# on the above events when the triggered actor is the repo owner
2122
# - docker
2223
# on Release creation (ex: maybe a maintainer that isn't repo owner)
@@ -44,18 +45,30 @@ jobs:
4445
mdlint:
4546
runs-on: ubuntu-latest
4647
steps:
47-
- name: Check out repository code
48-
uses: actions/checkout@v4
49-
50-
- name: Run markdownlint-cli2
51-
uses: DavidAnson/markdownlint-cli2-action@v17
52-
# file globbing configured in .markdownlint-cli2.yaml
48+
- name: Check out repository code
49+
uses: actions/checkout@v4
50+
51+
- name: Run markdownlint-cli2
52+
uses: DavidAnson/markdownlint-cli2-action@v17
53+
# file globbing configured in .markdownlint-cli2.yaml
54+
55+
yamllint:
56+
runs-on: ubuntu-latest
57+
steps:
58+
- name: Check out repository code
59+
uses: actions/checkout@v4
60+
61+
- name: Run yamllint
62+
uses: ibiqlik/action-yamllint@v3
63+
with:
64+
file_or_dir: .
5365

5466
test:
5567
runs-on: ubuntu-latest
5668
needs:
5769
- "ruff"
5870
- "mdlint"
71+
- "yamllint"
5972
strategy:
6073
matrix:
6174
python-version: ["3.9", "3.10", "3.11", "3.12"]
@@ -117,3 +130,4 @@ jobs:
117130
push: true
118131
platforms: linux/amd64,linux/arm64
119132
tags: ${{ steps.meta.outputs.tags }}
133+
...

.yamllint.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
extends: default
3+
4+
ignore:
5+
- .venv/
6+
- node_modules/
7+
...

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[tool.ruff]
2-
# Set the maximum line length to 79.
2+
# Set the maximum line length to 79
33
line-length = 79

0 commit comments

Comments
 (0)