38 lines
1.5 KiB
Bash
38 lines
1.5 KiB
Bash
#!/usr/bin/env bash
|
|
# Run the checks owned by the pinned components in separate environments.
|
|
set -euo pipefail
|
|
|
|
cd "$(dirname "${BASH_SOURCE[0]}")/.."
|
|
command -v uv >/dev/null 2>&1 || {
|
|
echo 'uv is required to prepare isolated component test environments.' >&2
|
|
exit 1
|
|
}
|
|
|
|
for component in win-diagnostics reportist; do
|
|
if [[ ! -f "$component/requirements.txt" || ! -f "$component/tests/test_contract.py" ]]; then
|
|
echo "Missing $component checks. Run: git submodule update --init --recursive" >&2
|
|
exit 1
|
|
fi
|
|
done
|
|
|
|
uv --version
|
|
for component in win-diagnostics reportist; do
|
|
echo "Checking $component ($(git -C "$component" rev-parse HEAD))"
|
|
environment=".venv/component-checks/$component"
|
|
uv venv --python 3.11 --allow-existing "$environment"
|
|
uv pip sync --python "$environment/bin/python" "$component/requirements.txt"
|
|
"$environment/bin/python" --version
|
|
"$environment/bin/python" -m unittest discover -s "$component/tests" -p 'test_*.py' -v
|
|
done
|
|
|
|
echo "Checking beffroi-reports ($(git -C beffroi-reports rev-parse HEAD))"
|
|
DIAGNOSTIC_VALIDATOR="$(pwd)/win-diagnostics/tools/validate.py" \
|
|
REPORT_VALIDATOR="$(pwd)/reportist/tools/validate.py" \
|
|
BRANDING="$(pwd)/beffroi-reports/config/branding/default.json" \
|
|
BRANDING_ROOT="$(pwd)/beffroi-reports" \
|
|
BRANDING_DIRECTORY="$(pwd)/beffroi-reports/config/branding" \
|
|
.venv/component-checks/reportist/bin/python -m unittest discover \
|
|
-s beffroi-reports/tests -p 'test_*.py' -v
|
|
|
|
echo 'Contract and adapter checks passed. Analysis and PDF checks remain pending.'
|