forked from CMSgov/dpc-app
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dpc-unit-test.sh
executable file
·32 lines (25 loc) · 1.34 KB
/
dpc-unit-test.sh
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
#!/bin/bash
set -Ee
# Current working directory
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
# Configure the Maven log level
export MAVEN_OPTS=-Dorg.slf4j.simpleLogger.defaultLogLevel=info
# Include secure environment variables
set -o allexport
[[ -f ${DIR}/ops/config/decrypted/local.env ]] && source ${DIR}/ops/config/decrypted/local.env
set +o allexport
function _finally {
docker-compose down
}
trap _finally EXIT
echo "┌──────────────────────────────────────────┐"
echo "│ │"
echo "│ Running Unit Tests... │"
echo "│ │"
echo "└──────────────────────────────────────────┘"
mvn test -Punit-tests -ntp
echo "┌──────────────────────────────────────────┐"
echo "│ │"
echo "│ Unit Tests Complete │"
echo "│ │"
echo "└──────────────────────────────────────────┘"