test: shellcheck support for run-tests.sh
The severity is set to "warning" by default, but can be controlled via the SHELLCHECK_SEVERITY env variable.
This commit is contained in:
parent
f4c850d7d0
commit
5c6605b974
2 changed files with 5 additions and 0 deletions
|
|
@ -1,6 +1,7 @@
|
|||
#!/usr/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
SHELLCHECK_SEVERITY=${SHELLCHECK_SEVERITY:-warning}
|
||||
|
||||
run_test() {
|
||||
podman run -it -v "$(pwd)":/github/workspace:z --env "GITHUB_WORKSPACE=/github/workspace" koji.test "$1"
|
||||
|
|
@ -10,5 +11,8 @@ pushd test
|
|||
podman build -t koji.test -f Dockerfile .
|
||||
popd
|
||||
|
||||
SCRIPTS="$(git ls-files --exclude='*.sh' --ignored | xargs echo)"
|
||||
|
||||
run_test "shellcheck -S ${SHELLCHECK_SEVERITY} ${SCRIPTS}"
|
||||
run_test "pytest -v --cov-report=term --cov=osbuild test/unit/"
|
||||
run_test "pylint plugins/**/*.py test/**/*.py"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue