Skip to content

Commit

Permalink
ci(yamllint): add YAML linting (reanahub#838)
Browse files Browse the repository at this point in the history
  • Loading branch information
jlemesh committed Oct 10, 2024
1 parent 0c0849d commit 788d644
Show file tree
Hide file tree
Showing 6 changed files with 64 additions and 27 deletions.
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[*.{yaml,yml}]
indent_size = 2
indent_style = space
18 changes: 18 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -175,3 +175,21 @@ jobs:

- name: Run chart-testing (lint)
run: ct lint --config .github/ct.yaml

lint-yamllint:
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Lint YAML files
run: |
pip install yamllint
./run-tests.sh --check-yamllint
9 changes: 9 additions & 0 deletions .yamllint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
extends: default

rules:
document-start: disable
line-length: disable
truthy: disable

ignore:
- helm/reana # is linted by `helm lint` and `ct lint`
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ include *.yml
include .flake8
include LICENSE
include pytest.ini
exclude .editorconfig
exclude .readthedocs.yaml
prune docs/_build
recursive-include reana *.py
Expand Down
54 changes: 27 additions & 27 deletions helm/configurations/values-dev.yaml
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
# REANA components pointing to `latest`, locally built master branch

components:
reana_db:
image: docker.io/library/postgres:14.10
reana_server:
image: docker.io/reanahub/reana-server
environment:
REANA_SCHEDULER_REQUEUE_SLEEP: 2
REANA_RATELIMIT_SLOW: "5 per second"
REANA_RATELIMIT_GUEST_USER: "100 per second"
REANA_RATELIMIT_AUTHENTICATED_USER: "100 per second"
reana_workflow_controller:
image: docker.io/reanahub/reana-workflow-controller
environment:
REANA_RUNTIME_KUBERNETES_KEEP_ALIVE_JOBS_WITH_STATUSES: failed
reana_workflow_engine_cwl:
image: docker.io/reanahub/reana-workflow-engine-cwl
reana_workflow_engine_yadage:
image: docker.io/reanahub/reana-workflow-engine-yadage
reana_workflow_engine_serial:
image: docker.io/reanahub/reana-workflow-engine-serial
reana_workflow_engine_snakemake:
image: docker.io/reanahub/reana-workflow-engine-snakemake
reana_job_controller:
image: docker.io/reanahub/reana-job-controller
reana_message_broker:
image: docker.io/reanahub/reana-message-broker
reana_ui:
image: docker.io/reanahub/reana-ui
reana_db:
image: docker.io/library/postgres:14.10
reana_server:
image: docker.io/reanahub/reana-server
environment:
REANA_SCHEDULER_REQUEUE_SLEEP: 2
REANA_RATELIMIT_SLOW: "5 per second"
REANA_RATELIMIT_GUEST_USER: "100 per second"
REANA_RATELIMIT_AUTHENTICATED_USER: "100 per second"
reana_workflow_controller:
image: docker.io/reanahub/reana-workflow-controller
environment:
REANA_RUNTIME_KUBERNETES_KEEP_ALIVE_JOBS_WITH_STATUSES: failed
reana_workflow_engine_cwl:
image: docker.io/reanahub/reana-workflow-engine-cwl
reana_workflow_engine_yadage:
image: docker.io/reanahub/reana-workflow-engine-yadage
reana_workflow_engine_serial:
image: docker.io/reanahub/reana-workflow-engine-serial
reana_workflow_engine_snakemake:
image: docker.io/reanahub/reana-workflow-engine-snakemake
reana_job_controller:
image: docker.io/reanahub/reana-job-controller
reana_message_broker:
image: docker.io/reanahub/reana-message-broker
reana_ui:
image: docker.io/reanahub/reana-ui

pgbouncer:
enabled: true
6 changes: 6 additions & 0 deletions run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ check_helm () {
helm lint helm/reana
}

check_yamllint () {
yamllint .
}

check_all () {
check_commitlint
check_shellcheck
Expand All @@ -85,6 +89,7 @@ check_all () {
check_sphinx
check_pytest
check_helm
check_yamllint
}

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

0 comments on commit 788d644

Please sign in to comment.