2
0

run-full-tests 1.2 KB

1234567891011121314151617181920212223242526272829
  1. #!/bin/sh
  2. # This script installs test dependencies and runs all tests, including end-to-end tests. It
  3. # is designed to run inside a test container, and presumes that other test infrastructure like
  4. # databases are already running. Therefore, on a developer machine, you should not run this script
  5. # directly. Instead, run scripts/run-end-to-end-tests
  6. #
  7. # For more information, see:
  8. # https://torsion.org/borgmatic/docs/how-to/develop-on-borgmatic/
  9. set -e
  10. if [ -z "$TEST_CONTAINER" ]; then
  11. echo "This script is designed to work inside a test container and is not intended to"
  12. echo "be run manually. If you're trying to run borgmatic's end-to-end tests, execute"
  13. echo "scripts/run-end-to-end-dev-tests instead."
  14. exit 1
  15. fi
  16. apk add --no-cache python3 py3-pip borgbackup postgresql17-client mariadb-client mongodb-tools \
  17. py3-mongo py3-regex py3-ruamel.yaml py3-ruamel.yaml.clib py3-tox py3-yaml ruff sqlite uv bash \
  18. fish
  19. export SHELL=/bin/bash
  20. export PATH="/root/.local/bin:$PATH"
  21. uv tool install tox --with tox-uv
  22. export COVERAGE_FILE=/tmp/.coverage
  23. tox --workdir /tmp/.tox -e py39,py313 --sitepackages
  24. tox --workdir /tmp/.tox --sitepackages -e end-to-end