#!/usr/bin/env bash

set -e

echo 'Running integration tests...'
# -p no:cacheprovider : disable .pytest_cache (CI is ephemeral)
# -n auto             : pytest-xdist, one worker per CPU
# --dist=worksteal    : idle workers steal pending tests from busy workers (best balance for variable durations)
# -rA                 : end-of-run summary listing all outcomes (passed/failed/skipped/etc.)
PYTHONDONTWRITEBYTECODE=1 COVERAGE_FILE=build/.coverage python -m pytest -v tests/integration/ \
  -p no:cacheprovider \
  -n auto --dist=worksteal \
  -rA
