diff --git a/.ci/ec.sh b/.ci/ec.sh new file mode 100755 index 000000000..37347a22d --- /dev/null +++ b/.ci/ec.sh @@ -0,0 +1,13 @@ +#!/bin/sh -e +# Description: editorconfig-checker: lint for trailing whitespaces etc. +# https://postmarktos.org/pmb-ci + +if [ "$(id -u)" = 0 ]; then + set -x + apk -q add \ + editorconfig-checker + exec su "${TESTUSER:-build}" -c "sh -e $0" +fi + +set -x +ec diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f4b566cc3..f51f92880 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -65,10 +65,9 @@ editor-config: stage: lint <<: *only-default image: alpine:edge - before_script: - - apk -q add editorconfig-checker script: - - ec + - .ci/lib/gitlab_prepare_ci.sh + - .ci/ec.sh # aports checks (generic) aports-static: