#!/bin/bash set -eu set -o pipefail echo Running unit tests ============================================ python3 -m CoverageTestRunner --ignore-missing-from=without-tests yarns vmdb echo echo Checking every plugin looks OK ============================================ for file in vmdb/plugins/*.py do case "$file" in *_plugin.py) ;; *) echo "File $file should end in _plugin.py" 1>&2 ; exit 1 ;; esac if ! grep -q 'class .*Plugin' "$file" then echo "File $file does not seem to have a Plugin class" 1>&2 exit 1 fi done echo if command -v sp-codegen > /dev/null then echo Running Subplot ============================================ sp-codegen vmdb2.md -o test.py --run echo fi echo Running yarn tests ======================================== if python3 -c 'import yarnutils' 2>/dev/null then yarn \ --shell=python3 \ --shell-arg '' \ --shell-library yarns/lib.py \ --env "PYTHONPATH=$(pwd)/yarns" \ --cd-datadir \ yarns/*.yarn "$@" echo fi echo Formatting docs ======================================== ./format.sh plugindocs() { ls -1 vmdb/plugins/*.mdwn } steps() { sed -n '/