forked from neicnordic/sda-pipeline
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun_tests.sh
executable file
·46 lines (35 loc) · 991 Bytes
/
run_tests.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
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/bash
#
cd "$(dirname "$0")"
docker-compose -f compose-sda.yml down -v --remove-orphans
docker-compose -f compose-backend.yml down -v --remove-orphans
cd ..
tmpdir=$(mktemp -d)
# Set up a scratch python environment to not pollute anything else
python3 -m venv "$tmpdir"
. "$tmpdir/bin/activate"
export STORAGETYPE
for storage in s3 posix; do
git checkout dev_utils/env.*
STORAGETYPE=$storage
for runscript in $(ls -1 .github/integration/setup/{common,${storage}}/*.sh 2>/dev/null | sort -t/ -k5 -n); do
echo "Executing setup script $runscript";
if bash -x "$runscript"; then
:
else
echo "Setup failed"
rm -rf "$tmpdir"
exit 1
fi
done
for runscript in $(ls -1 .github/integration/tests/{common,${storage}}/*.sh 2>/dev/null | sort -t/ -k5 -n); do
echo "Executing test script $runscript";
if bash -x "$runscript"; then
:
else
echo "$runscript failed, bailing out"
rm -rf "$tmpdir"
exit 1
fi
done
done