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>
This commit is contained in:
Philip Withnall 2020-11-17 14:52:25 +00:00
parent c7d2206df3
commit 72e4781ffc

View File

@ -40,29 +40,6 @@ variables:
only:
- schedules
sh-check:
extends: .only-default
image: $DEBIAN_IMAGE
stage: style-check
allow_failure: true
script:
- .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
@ -70,6 +47,9 @@ style-check-diff:
allow_failure: true
script:
- .gitlab-ci/run-style-check-diff.sh
- .gitlab-ci/run-shellcheck.sh
- .gitlab-ci/run-black.sh
- .gitlab-ci/run-flake8.sh
check-todos:
extends: .only-default