debian-koji-osbuild/run-tests.sh
Christian Kellner e5f563c9a1 run-tests: use pytest and generate coverage report
Use the more powerful pytest framework together with pytest-cov
to generate coverage support.
2020-09-14 17:37:35 +02:00

14 lines
311 B
Bash
Executable file

#!/usr/bin/bash
set -euo pipefail
run_test() {
podman run -it -v $(pwd):/github/workspace:z --env "GITHUB_WORKSPACE=/github/workspace" koji.test "$1"
}
pushd test
podman build -t koji.test -f Dockerfile .
popd
run_test "pytest -v --cov-report=term --cov=osbuild test/unit/"
run_test "pylint test/**/*.py"