[glib: 3/4] ci: Temporarily fold SH and Py checks into style-check job




commit 72e4781ffcdcce48ba3c22508cdb4317ea1273ae
Author: Philip Withnall <pwithnall endlessos org>
Date:   Tue Nov 17 14:52:25 2020 +0000

    ci: Temporarily fold SH and Py checks into style-check job
    
    It doesn’t seem to be possible to use `only:changes` from a branch
    pipeline extending `.only-default` and have it correctly trigger when
    `*.sh` or `*.py` files are modified.
    
    We possibly need to convert all our pipelines to be merge-request-only,
    but that’s an avenue I’ve been down before and I couldn’t get it to
    work. Using
    [`workflow:rules`](https://docs.gitlab.com/ee/ci/yaml/README.html#workflowrules)
    might fix that, but I don’t have time to rework the entire CI to use
    that now.
    
    So in the meantime, move the SH and Py checks into the existing
    style-check job so we’re not always spinning up two additional container
    instances on every merge request.
    
    See !1743.
    
    Signed-off-by: Philip Withnall <pwithnall endlessos org>

 .gitlab-ci.yml | 24 ++----------------------
 1 file changed, 2 insertions(+), 22 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 80dbfef83..e79a66767 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -40,36 +40,16 @@ variables:
   only:
     - schedules
 
-sh-check:
+style-check-diff:
   extends: .only-default
   image: $DEBIAN_IMAGE
   stage: style-check
   allow_failure: true
   script:
+    - .gitlab-ci/run-style-check-diff.sh
     - .gitlab-ci/run-shellcheck.sh
-  only:
-    changes:
-      - "**/*.sh"
-
-py-check:
-  extends: .only-default
-  image: $DEBIAN_IMAGE
-  stage: style-check
-  allow_failure: true
-  script:
     - .gitlab-ci/run-black.sh
     - .gitlab-ci/run-flake8.sh
-  only:
-    changes:
-      - "**/*.py"
-
-style-check-diff:
-  extends: .only-default
-  image: $DEBIAN_IMAGE
-  stage: style-check
-  allow_failure: true
-  script:
-    - .gitlab-ci/run-style-check-diff.sh
 
 check-todos:
   extends: .only-default


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]