Skip to content

Commit 97b0a62

Browse files
committed
ci(yamllint): add YAML linting (reanahub#838)
Closes reanahub#836
1 parent 0c0849d commit 97b0a62

File tree

5 files changed

+61
-27
lines changed

5 files changed

+61
-27
lines changed

Diff for: .github/workflows/ci.yml

+18
Original file line numberDiff line numberDiff line change
@@ -175,3 +175,21 @@ jobs:
175175

176176
- name: Run chart-testing (lint)
177177
run: ct lint --config .github/ct.yaml
178+
179+
lint-yamllint:
180+
runs-on: ubuntu-24.04
181+
steps:
182+
- name: Checkout
183+
uses: actions/checkout@v4
184+
with:
185+
fetch-depth: 0
186+
187+
- name: Setup Python
188+
uses: actions/setup-python@v5
189+
with:
190+
python-version: "3.12"
191+
192+
- name: Lint YAML files
193+
run: |
194+
pip install yamllint
195+
./run-tests.sh --check-yamllint

Diff for: .yamllint.yaml

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
extends: default
2+
3+
rules:
4+
document-start: disable
5+
line-length: disable
6+
truthy: disable
7+
8+
ignore:
9+
- helm/reana # is linted by `helm lint` and `ct lint`

Diff for: MANIFEST.in

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ include *.yml
1313
include .flake8
1414
include LICENSE
1515
include pytest.ini
16+
exclude .editorconfig
1617
exclude .readthedocs.yaml
1718
prune docs/_build
1819
recursive-include reana *.py

Diff for: helm/configurations/values-dev.yaml

+27-27
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,33 @@
11
# REANA components pointing to `latest`, locally built master branch
22

33
components:
4-
reana_db:
5-
image: docker.io/library/postgres:14.10
6-
reana_server:
7-
image: docker.io/reanahub/reana-server
8-
environment:
9-
REANA_SCHEDULER_REQUEUE_SLEEP: 2
10-
REANA_RATELIMIT_SLOW: "5 per second"
11-
REANA_RATELIMIT_GUEST_USER: "100 per second"
12-
REANA_RATELIMIT_AUTHENTICATED_USER: "100 per second"
13-
reana_workflow_controller:
14-
image: docker.io/reanahub/reana-workflow-controller
15-
environment:
16-
REANA_RUNTIME_KUBERNETES_KEEP_ALIVE_JOBS_WITH_STATUSES: failed
17-
reana_workflow_engine_cwl:
18-
image: docker.io/reanahub/reana-workflow-engine-cwl
19-
reana_workflow_engine_yadage:
20-
image: docker.io/reanahub/reana-workflow-engine-yadage
21-
reana_workflow_engine_serial:
22-
image: docker.io/reanahub/reana-workflow-engine-serial
23-
reana_workflow_engine_snakemake:
24-
image: docker.io/reanahub/reana-workflow-engine-snakemake
25-
reana_job_controller:
26-
image: docker.io/reanahub/reana-job-controller
27-
reana_message_broker:
28-
image: docker.io/reanahub/reana-message-broker
29-
reana_ui:
30-
image: docker.io/reanahub/reana-ui
4+
reana_db:
5+
image: docker.io/library/postgres:14.10
6+
reana_server:
7+
image: docker.io/reanahub/reana-server
8+
environment:
9+
REANA_SCHEDULER_REQUEUE_SLEEP: 2
10+
REANA_RATELIMIT_SLOW: "5 per second"
11+
REANA_RATELIMIT_GUEST_USER: "100 per second"
12+
REANA_RATELIMIT_AUTHENTICATED_USER: "100 per second"
13+
reana_workflow_controller:
14+
image: docker.io/reanahub/reana-workflow-controller
15+
environment:
16+
REANA_RUNTIME_KUBERNETES_KEEP_ALIVE_JOBS_WITH_STATUSES: failed
17+
reana_workflow_engine_cwl:
18+
image: docker.io/reanahub/reana-workflow-engine-cwl
19+
reana_workflow_engine_yadage:
20+
image: docker.io/reanahub/reana-workflow-engine-yadage
21+
reana_workflow_engine_serial:
22+
image: docker.io/reanahub/reana-workflow-engine-serial
23+
reana_workflow_engine_snakemake:
24+
image: docker.io/reanahub/reana-workflow-engine-snakemake
25+
reana_job_controller:
26+
image: docker.io/reanahub/reana-job-controller
27+
reana_message_broker:
28+
image: docker.io/reanahub/reana-message-broker
29+
reana_ui:
30+
image: docker.io/reanahub/reana-ui
3131

3232
pgbouncer:
3333
enabled: true

Diff for: run-tests.sh

+6
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,10 @@ check_helm () {
7575
helm lint helm/reana
7676
}
7777

78+
check_yamllint () {
79+
yamllint .
80+
}
81+
7882
check_all () {
7983
check_commitlint
8084
check_shellcheck
@@ -85,6 +89,7 @@ check_all () {
8589
check_sphinx
8690
check_pytest
8791
check_helm
92+
check_yamllint
8893
}
8994

9095
if [ $# -eq 0 ]; then
@@ -103,5 +108,6 @@ case $arg in
103108
--check-sphinx) check_sphinx;;
104109
--check-pytest) check_pytest;;
105110
--check-helm) check_helm;;
111+
--check-yamllint) check_yamllint;;
106112
*) echo "[ERROR] Invalid argument '$arg'. Exiting." && exit 1;;
107113
esac

0 commit comments

Comments
 (0)