forked from Xabaril/Balea
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sh
30 lines (21 loc) · 802 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 [NET6.0]"
dotnet test --framework net6.0 ./test/FunctionalTests/FunctionalTests.csproj
echo "Runing functional tests [NET8.0]"
dotnet test --framework net8.0 ./test/FunctionalTests/FunctionalTests.csproj
echo "Finalizing docker containers"
docker-compose -f build/docker-compose-infrastructure.yml down