Add dotnet tests to travis

This commit is contained in:
Cyberboss
2018-09-04 16:25:15 -04:00
parent 05f667b0bc
commit d1d6aa4861
3 changed files with 59 additions and 16 deletions
+29 -15
View File
@@ -2,24 +2,38 @@ language: generic
sudo: false
git:
depth: 1
env:
global:
- BYOND_MAJOR="511"
- BYOND_MINOR="1385"
- DMEName="tests/DMAPI/travistester.dme"
cache:
directories:
- $HOME/BYOND-${BYOND_MAJOR}.${BYOND_MINOR}
matrix:
include:
- env:
- DMAPI=true
- BYOND_MAJOR="511"
- BYOND_MINOR="1385"
- DMEName="tests/DMAPI/travistester.dme"
name: "DMAPI Unit Tests"
cache:
directories:
- $HOME/BYOND-${BYOND_MAJOR}.${BYOND_MINOR}
addons:
apt:
packages:
- libc6-i386
- libstdc++6:i386
addons:
apt:
packages:
- libc6-i386
- libstdc++6:i386
- env:
- DMAPI=false
name: "Linux Build"
dotnet: 2.1.300
services:
- mysql
cache:
directories:
- $HOME/.nuget/packages
install:
- build/install_byond.sh
- if [ $DMAPI = true ]; then build/install_byond.sh fi
- if [ $DMAPI = false ]; then nuget restore tgstation-server.sln fi
script:
- tests/DMAPI/build_byond.sh
- if [ $DMAPI = true ]; then tests/DMAPI/build_byond.sh || travis_terminate 1 fi
- if [ $DMAPI = false ]; then build/test_core.sh fi
+28
View File
@@ -0,0 +1,28 @@
#!/bin/bash
set -e
cd tests/Tgstation.Server.Api.Tests
dotnet test
cd ../Tgstation.Server.Client.Tests
dotnet test
cd ../Tgstation.Server.Host.Tests
dotnet test
cd ../Tgstation.Server.Host.Watchdog.Tests
dotnet test
cd ../Tgstation.Server.Host.Console.Tests
dotnet test
cd ../Tgstation.Server.Host.Tests
export TGS4_TEST_DATABASE_TYPE=MySql
export TGS4_TEST_CONNECTION_STRING="server=127.0.0.1;uid=root;pwd=;database=tgs_test"
dotnet test
+2 -1
View File
@@ -25,6 +25,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{6FF654E6
build\Dockerfile = build\Dockerfile
build\Doxyfile = build\Doxyfile
build\install_byond.sh = build\install_byond.sh
build\test_core.sh = build\test_core.sh
build\tgs.docker.sh = build\tgs.docker.sh
build\tgs.ico = build\tgs.ico
build\UploadCoverage.ps1 = build\UploadCoverage.ps1
@@ -112,7 +113,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".github", ".github", "{E821
.github\ISSUE_TEMPLATE.md = .github\ISSUE_TEMPLATE.md
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tgstation.Server.Tests", "tests\Tgstation.Server.Tests\Tgstation.Server.Tests.csproj", "{09056964-1C74-445A-96EC-33F6DFC07916}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tgstation.Server.Tests", "tests\Tgstation.Server.Tests\Tgstation.Server.Tests.csproj", "{09056964-1C74-445A-96EC-33F6DFC07916}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution