aboutsummaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorJP Dillingham <jpdillingham@gmail.com>2021-01-02 13:40:34 -0600
committerJP Dillingham <jpdillingham@gmail.com>2021-01-02 13:40:34 -0600
commit07dfd25f47fd36809c5fa9af835122b86a34c291 (patch)
tree6f5756cef78494b5540e13390939595d29cddf58 /bin
parentdaaf4acfa6f8fe97925640a458cccd40e46419f4 (diff)
downloadslskd-07dfd25f47fd36809c5fa9af835122b86a34c291.tar.gz
stub tests
Diffstat (limited to 'bin')
-rwxr-xr-xbin/build26
1 files changed, 23 insertions, 3 deletions
diff --git a/bin/build b/bin/build
index 4d1bf53b..36765a1c 100755
--- a/bin/build
+++ b/bin/build
@@ -6,8 +6,17 @@ cd src/web
echo $'\n> pwd\n'
pwd
+
echo $'\n> npm install\n'
npm install
+
+if [ ! "$1" == "--skip-tests" ]; then
+ echo $'\n> npm run test-unattended\n'
+ npm run test-unattended
+else
+ echo $'\ntests skipped\n'
+fi
+
echo $'\n> npm run build\n'
npm run build
@@ -20,12 +29,23 @@ touch ../slskd/wwwroot/.gitkeep
echo $'\n> cp -r build/* ../slskd/wwwroot/\n'
cp -r build/* ../slskd/wwwroot/
-# publish api + web
+# build api + web
cd ../slskd
+
echo $'\n> pwd\n'
pwd
-echo $'\n> dotnet build --configuration Release\n'
-dotnet build --configuration Release
+echo $'\n> dotnet build --no-incremental --nologo --configuration Release\n'
+dotnet build --no-incremental --nologo --configuration Release
+
+if [ ! "$1" == "--skip-tests" ]; then
+ echo $'\n> dotnet test --no-build --verbosity minimal --blame ../../tests/slskd.Tests.Unit'
+ dotnet test --no-build --verbosity minimal --blame ../../tests/slskd.Tests.Unit
+
+ echo $'\n> dotnet test --no-build --verbosity minimal --blame ../../tests/slskd.Tests.Integration'
+ dotnet test --no-build --verbosity minimal --blame ../../tests/slskd.Tests.Integration
+else
+ echo $'\ntests skipped\n'
+fi
echo $'\nbuild succeded.' \ No newline at end of file