-
Notifications
You must be signed in to change notification settings - Fork 4
/
docker_tests
executable file
·35 lines (20 loc) · 1.04 KB
/
docker_tests
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/bash
set -e
# magic line to ensure that we're always inside the root of our application,
# no matter from which directory we'll run script
# thanks to it we can just enter `./bin/docker_tests`
cd "${0%/*}/.."
echo "Running tests"
# Always run dc down regardless of success/failure
trap 'bin/dc down' EXIT
export ROLE=test
bin/dc up -d --remove-orphans
bin/dc exec -T runserver /bin/bash -c '! poetry install --dry-run | grep "Warning: The lock file is not up to date" || (echo "poetry.lock does not match pyproject.toml" && exit 1)'
bin/dc exec -T runserver safety check -i 38224
bin/dc exec -T runserver prospector -o pylint
bin/speccy
bin/openapi_spellcheck
bin/readme_spellcheck
bin/dc exec -T runserver bandit -r apps
bin/dc exec -T runserver pytest -p no:cacheprovider --cov=apps --cov-config=.coveragerc --ds=conf.test_settings --cov-report= tests/profiles_enabled
bin/dc exec -T runserver pytest -p no:cacheprovider --cov=apps --cov-config=.coveragerc --cov-append --ds=conf.test_settings_profiles_disabled tests/profiles_disabled