run-full-tests 1.3 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 postgresql-client mariadb-client mongodb-tools \
  17. py3-ruamel.yaml py3-ruamel.yaml.clib py3-yaml bash sqlite fish
  18. # If certain dependencies of black are available in this version of Alpine, install them.
  19. apk add --no-cache py3-typed-ast py3-regex || true
  20. python3 -m pip install --no-cache --upgrade pip==24.2 setuptools==72.1.0
  21. pip3 install --ignore-installed tox==4.11.3
  22. export COVERAGE_FILE=/tmp/.coverage
  23. tox --workdir /tmp/.tox --sitepackages
  24. tox --workdir /tmp/.tox --sitepackages -e end-to-end