Skip to content

Commit 112afe5

Browse files
ci(yamllint): add YAML linting (#489)
Closes #488
1 parent 7cd4707 commit 112afe5

File tree

4 files changed

+31
-0
lines changed

4 files changed

+31
-0
lines changed

.github/workflows/ci.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,22 @@ jobs:
114114
pip install check-manifest
115115
./run-tests.sh --check-manifest
116116
117+
lint-yamllint:
118+
runs-on: ubuntu-24.04
119+
steps:
120+
- name: Checkout
121+
uses: actions/checkout@v4
122+
123+
- name: Setup Python
124+
uses: actions/setup-python@v5
125+
with:
126+
python-version: "3.12"
127+
128+
- name: Lint YAML files
129+
run: |
130+
pip install yamllint
131+
./run-tests.sh --check-yamllint
132+
117133
docs-sphinx:
118134
runs-on: ubuntu-24.04
119135
steps:

.yamllint.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
extends: default
2+
3+
rules:
4+
comments:
5+
min-spaces-from-content: 1
6+
document-start: disable
7+
line-length: disable
8+
truthy: disable

AUTHORS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ The list of contributors in alphabetical order:
77
- [Alp Tuna](https://orcid.org/0009-0001-1915-3993)
88
- [Anton Khodak](https://orcid.org/0000-0003-3263-4553)
99
- [Audrius Mecionis](https://orcid.org/0000-0002-3759-1663)
10+
- [Cameron McClymont](https://orcid.org/0009-0002-0176-5251)
1011
- [Chris Hollowell](https://orcid.org/0000-0003-1239-111X)
1112
- [Cody Kankel](https://github.com/CodyKank)
1213
- [Diego Rodriguez](https://orcid.org/0000-0003-0649-2002)

run-tests.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,10 @@ check_pytest () {
129129
stop_db_container
130130
}
131131

132+
check_yamllint() {
133+
yamllint .
134+
}
135+
132136
check_dockerfile () {
133137
docker run -i --rm docker.io/hadolint/hadolint:v2.12.0 < Dockerfile
134138
}
@@ -146,6 +150,7 @@ check_all () {
146150
check_openapi_spec
147151
check_manifest
148152
check_sphinx
153+
check_yamllint
149154
}
150155

151156
check_all_darwin () {
@@ -195,6 +200,7 @@ case $arg in
195200
--check-manifest) check_manifest;;
196201
--check-sphinx) check_sphinx;;
197202
--check-pytest) check_pytest;;
203+
--check-yamllint) check_yamllint;;
198204
--check-all) check_all;;
199205
--check-dockerfile) check_dockerfile;;
200206
--check-docker-build) check_docker_build;;

0 commit comments

Comments
 (0)