CI: flake8: adjust for 'pmbootstrap ci' (MR 3608)
This commit is contained in:
parent
a2f75963bf
commit
613aa1c68a
2 changed files with 17 additions and 2 deletions
14
.ci/flake8.sh
Executable file
14
.ci/flake8.sh
Executable file
|
@ -0,0 +1,14 @@
|
|||
#!/bin/sh -e
|
||||
# Description: lint CI related python scripts/tests
|
||||
# https://postmarktos.org/pmb-ci
|
||||
|
||||
if [ "$(id -u)" = 0 ]; then
|
||||
set -x
|
||||
apk -q add py3-flake8
|
||||
exec su "${TESTUSER:-build}" -c "sh -e $0"
|
||||
fi
|
||||
|
||||
set -x
|
||||
|
||||
# shellcheck disable=SC2046
|
||||
flake8 --ignore E501,F401,E722,W504,W605 $(find .ci -name '*.py')
|
|
@ -36,7 +36,7 @@ wiki:
|
|||
- .ci/wiki.sh
|
||||
|
||||
# testcases linting
|
||||
testcases-linting:
|
||||
flake8:
|
||||
stage: lint
|
||||
<<: *only-default
|
||||
only:
|
||||
|
@ -48,7 +48,8 @@ testcases-linting:
|
|||
before_script:
|
||||
- apk -q add py-flake8
|
||||
script:
|
||||
- flake8 --ignore E501,F401,E722,W504,W605
|
||||
- .ci/lib/gitlab_prepare_ci.sh
|
||||
- .ci/flake8.sh
|
||||
|
||||
# shellcheck
|
||||
shellcheck:
|
||||
|
|
Loading…
Reference in a new issue