forked from Xabaril/Balea
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.sh
30 lines (21 loc) · 816 Bytes
/
build.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
#!/bin/bash
#Add the dotnet path to the path
export PATH="$HOME/.dotnet":$PATH
if [ -d "./artifacts" ]
then
rm -Rf "./artifacts";
fi
dotnet restore
commitHash=$(git rev-parse --short HEAD)
suffix="-ci-local"
buildSuffix="$suffix-$commitHash"
echo "build: Version suffix is $buildSuffix"
dotnet build -c Release --version-suffix "$buildSuffix" -v q /nologo
echo "Starting docker containers"
docker-compose -f build/docker-compose-infrastructure.yml up -d
echo "Runing functional tests [NETCOREAPP3.1]"
dotnet test --framework netcoreapp3.1 ./test/FunctionalTests/FunctionalTests.csproj
echo "Runing functional tests [NET5.0]"
dotnet test --framework net5.0 ./test/FunctionalTests/FunctionalTests.csproj
echo "Finalizing docker containers"
docker-compose -f build/docker-compose-infrastructure.yml down