File: entrypoint-test.sh

package info (click to toggle)
python-scpi 2.4.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 292 kB
  • sloc: python: 912; sh: 26; makefile: 3
file content (16 lines) | stat: -rwxr-xr-x 489 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/bash -l
set -e
if [ "$#" -eq 0 ]; then
  # Kill cache, pytest complains about it if running local and docker tests in mapped volume
  find tests  -type d -name '__pycache__' -print0 | xargs -0 rm -rf {}
  # Make sure the service itself is installed
  poetry install
  # Make sure pre-commit checks were not missed because reasons
  pre-commit run --all-files
  # Then run the tests
  pytest --junitxml=pytest.xml tests/
  mypy --strict src tests
  bandit -r src
else
  exec "$@"
fi