From 424cf3a966c5d2965aed8bb11e39848d50e323c3 Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Thu, 27 Oct 2022 09:30:06 +0100 Subject: [PATCH] ci: Move shellcheck/black/flake8 checks to a new CI job which can fail We were regressing on Python style too often. Since Python code style is a lot easier to enforce than C code style, split it (and the shellcheck checks) out from `style-check-diff` into a new CI job which is allowed to fail the pipeline. Only trigger it when .sh or .py files have changed, which should reduce resource consumption. Signed-off-by: Philip Withnall --- .gitlab-ci.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 88a24b8e7..a9aa2d484 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -55,10 +55,21 @@ style-check-diff: allow_failure: true script: - .gitlab-ci/run-style-check-diff.sh + - .gitlab-ci/run-check-todos.sh + +sh-and-py-check: + extends: .only-default + image: $DEBIAN_IMAGE + stage: style-check + allow_failure: false + script: - .gitlab-ci/run-shellcheck.sh - .gitlab-ci/run-black.sh - .gitlab-ci/run-flake8.sh - - .gitlab-ci/run-check-todos.sh + only: + changes: + - "**/*.py" + - "**/*.sh" fedora-x86_64: extends: