Skip to content

Instantly share code, notes, and snippets.

@KangDroid
Last active August 4, 2021 14:03
Show Gist options
  • Save KangDroid/6d2c8eef8b4438e10627f41edcf0132a to your computer and use it in GitHub Desktop.
Save KangDroid/6d2c8eef8b4438e10627f41edcf0132a to your computer and use it in GitHub Desktop.
Run DotNet Test
#!/bin/bash
# Run Server with nohup
nohup /opt/mssql/bin/sqlservr --accept-eula &
# Sleep for 5 seconds..
sleep 5
# Setup default db
/opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P testPassword@ -Q "CREATE DATABASE [kdr-test]"
# Run[from working directory]
dotnet restore
cd MoneyManager
/root/.dotnet/tools/dotnet-ef database update
cd ..
dotnet test -p:CoverletOutputFormat=cobertura -p:CollectCoverage=true -p:Threshold=90
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment