mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-30 08:33:19 +01:00
133 lines
8.1 KiB
YAML
133 lines
8.1 KiB
YAML
version: '{build}'
|
|
pull_requests:
|
|
do_not_increment_build_number: true
|
|
environment:
|
|
TGS4_TEST_TEMP_DIRECTORY: C:/tgs4_test
|
|
TGS4_TEST_DATABASE_TYPE: SqlServer
|
|
TGS4_TEST_DUMP_API_SPEC: yes
|
|
TGS4_TEST_CONNECTION_STRING: Server=(local)\SQL2017;Initial Catalog=TGS_Test;User ID=sa;Password=Password12!
|
|
TGS4_TEST_GITHUB_TOKEN:
|
|
secure: lJNGAXwiB5HlWdthz3K4PetqpTG5IEAyRgKaiKxFMQ8HW8CcOjRtB97B05op7BsK
|
|
TGS4_TEST_DISCORD_TOKEN:
|
|
secure: 5ENtMfhHDI6SOgZ9nP7oHZVoIRFPfTjHQpfbCTB+UC8ePc4og5ew3DNzVCXNYxXvwqGyjz7gz3R302Iy3cfsDw==
|
|
TGS4_TEST_DISCORD_CHANNEL: 493119635319947269
|
|
TGS4_TEST_IRC_CONNECTION_STRING:
|
|
secure: ralERi6QrigvQYZWkLruZGP37RwuadDIkocs+gvT5OcOMUlBODExyI9FPss3HtGx
|
|
TGS4_TEST_IRC_CHANNEL: \#botbus
|
|
TGS4_RELEASE_NOTES_TOKEN:
|
|
secure: lJNGAXwiB5HlWdthz3K4PetqpTG5IEAyRgKaiKxFMQ8HW8CcOjRtB97B05op7BsK
|
|
|
|
branches:
|
|
only:
|
|
- dev
|
|
- master
|
|
skip_tags: true
|
|
image: Visual Studio 2019
|
|
configuration:
|
|
- Release
|
|
shallow_clone: true
|
|
artifacts:
|
|
- path: artifacts/ServerConsole
|
|
name: ServerConsole
|
|
- path: artifacts/ServerService
|
|
name: ServerService
|
|
- path: artifacts/ServerHost
|
|
name: ServerUpdatePackage
|
|
- path: src/DMAPI
|
|
name: DMAPI
|
|
- path: swagger.json
|
|
name: SwaggerSpec
|
|
cache:
|
|
- ~\.nuget\packages -> **\*.csproj
|
|
services:
|
|
- mssql2017
|
|
install:
|
|
- choco install codecov opencover.portable
|
|
- npm i -g ibm-openapi-validator
|
|
- nuget restore tgstation-server.sln
|
|
- ps: Install-Product node 10
|
|
build:
|
|
project: tgstation-server.sln
|
|
parallel: false
|
|
verbosity: minimal
|
|
publish_nuget: true
|
|
publish_nuget_symbols: true
|
|
use_snupkg_format: true
|
|
test_script:
|
|
- OpenCover.Console.exe -returntargetcode -register:user -target:"C:/Program Files/dotnet/dotnet.exe" -targetargs:"test -c %CONFIGURATION% --logger:trx;LogFileName=results.trx /p:DebugType=full tests/Tgstation.Server.Api.Tests/Tgstation.Server.Api.Tests.csproj" -filter:"+[Tgstation.Server*]* -[Tgstation.Server.Api.Tests*]*" -output:".\api_coverage.xml" -oldstyle
|
|
- ps: $wc = New-Object 'System.Net.WebClient'
|
|
- ps: $wc.UploadFile("https://ci.appveyor.com/api/testresults/mstest/$($env:APPVEYOR_JOB_ID)", (Resolve-Path .\tests\Tgstation.Server.Api.Tests\TestResults\results.trx))
|
|
- OpenCover.Console.exe -returntargetcode -register:user -target:"C:/Program Files/dotnet/dotnet.exe" -targetargs:"test -c %CONFIGURATION% --logger:trx;LogFileName=results.trx /p:DebugType=full tests/Tgstation.Server.Client.Tests/Tgstation.Server.Client.Tests.csproj" -filter:"+[Tgstation.Server*]* -[Tgstation.Server.Client.Tests*]*" -output:".\client_coverage.xml" -oldstyle
|
|
- ps: $wc = New-Object 'System.Net.WebClient'
|
|
- ps: $wc.UploadFile("https://ci.appveyor.com/api/testresults/mstest/$($env:APPVEYOR_JOB_ID)", (Resolve-Path .\tests\Tgstation.Server.Client.Tests\TestResults\results.trx))
|
|
- OpenCover.Console.exe -returntargetcode -register:user -target:"C:/Program Files/dotnet/dotnet.exe" -targetargs:"test -c %CONFIGURATION% --logger:trx;LogFileName=results.trx /p:DebugType=full tests/Tgstation.Server.Host.Tests/Tgstation.Server.Host.Tests.csproj" -filter:"+[Tgstation.Server*]* -[Tgstation.Server.Host.Tests*]* -[Tgstation.Server.Host]Tgstation.Server.Host.Database.Migrations*" -output:".\host_coverage.xml" -oldstyle
|
|
- ps: $wc = New-Object 'System.Net.WebClient'
|
|
- ps: $wc.UploadFile("https://ci.appveyor.com/api/testresults/mstest/$($env:APPVEYOR_JOB_ID)", (Resolve-Path .\tests\Tgstation.Server.Host.Tests\TestResults\results.trx))
|
|
- OpenCover.Console.exe -returntargetcode -register:user -target:"C:/Program Files/dotnet/dotnet.exe" -targetargs:"test -c %CONFIGURATION% --logger:trx;LogFileName=results.trx /p:DebugType=full tests/Tgstation.Server.Host.Console.Tests/Tgstation.Server.Host.Console.Tests.csproj" -filter:"+[Tgstation.Server*]* -[Tgstation.Server.Host.Console.Tests*]*" -output:".\console_coverage.xml" -oldstyle
|
|
- ps: $wc = New-Object 'System.Net.WebClient'
|
|
- ps: $wc.UploadFile("https://ci.appveyor.com/api/testresults/mstest/$($env:APPVEYOR_JOB_ID)", (Resolve-Path .\tests\Tgstation.Server.Host.Console.Tests\TestResults\results.trx))
|
|
- set path=%ProgramFiles(x86)%\Microsoft Visual Studio\2019\TestAgent\Common7\IDE\CommonExtensions\Microsoft\TestWindow;%path%
|
|
- vstest.console /logger:trx;LogFileName=results.trx "tests\Tgstation.Server.Host.Service.Tests\bin\%CONFIGURATION%\net472\Tgstation.Server.Host.Service.Tests.dll" /inIsolation /Platform:x64
|
|
- ps: $wc = New-Object 'System.Net.WebClient'
|
|
- ps: $wc.UploadFile("https://ci.appveyor.com/api/testresults/mstest/$($env:APPVEYOR_JOB_ID)", (Resolve-Path .\TestResults\results.trx))
|
|
- OpenCover.Console.exe -returntargetcode -register:user -target:"C:/Program Files/dotnet/dotnet.exe" -targetargs:"test -c %CONFIGURATION% --logger:trx;LogFileName=results.trx /p:DebugType=full tests/Tgstation.Server.Host.Watchdog.Tests/Tgstation.Server.Host.Watchdog.Tests.csproj" -filter:"+[Tgstation.Server*]* -[Tgstation.Server.Host.Watchdog.Tests*]*" -output:".\watchdog_coverage.xml" -oldstyle
|
|
- ps: $wc = New-Object 'System.Net.WebClient'
|
|
- ps: $wc.UploadFile("https://ci.appveyor.com/api/testresults/mstest/$($env:APPVEYOR_JOB_ID)", (Resolve-Path .\tests\Tgstation.Server.Host.Watchdog.Tests\TestResults\results.trx))
|
|
- OpenCover.Console.exe -returntargetcode -register:user -target:"C:/Program Files/dotnet/dotnet.exe" -targetargs:"test -c %CONFIGURATION% --logger:trx;LogFileName=results.trx --logger:console;noprogress=true /p:DebugType=full tests/Tgstation.Server.Tests/Tgstation.Server.Tests.csproj" -filter:"+[Tgstation.Server*]* -[Tgstation.Server.Tests*]* -[Tgstation.Server.Host]Tgstation.Server.Host.Database.Migrations..*" -output:".\server_coverage.xml" -oldstyle
|
|
- ps: $wc = New-Object 'System.Net.WebClient'
|
|
- ps: $wc.UploadFile("https://ci.appveyor.com/api/testresults/mstest/$($env:APPVEYOR_JOB_ID)", (Resolve-Path .\tests\Tgstation.Server.Tests\TestResults\results.trx))
|
|
- lint-openapi -p -c build/OpenApiValidationSettings.json C:/swagger.json
|
|
after_test:
|
|
- ps: Move-Item -path C:/swagger.json swagger.json
|
|
- ps: build/UploadCoverage.ps1
|
|
#host updater
|
|
- dotnet publish src/Tgstation.Server.Host/Tgstation.Server.Host.csproj -o artifacts/ServerHost -c %CONFIGURATION%
|
|
#console
|
|
- dotnet publish src/Tgstation.Server.Host.Console/Tgstation.Server.Host.Console.csproj -o artifacts/ServerConsole -c %CONFIGURATION%
|
|
- ps: Copy-Item -path "artifacts/ServerHost" -destination artifacts/ServerConsole/lib/Default -recurse
|
|
- ps: Move-Item -path artifacts/ServerConsole/lib/Default/appsettings.json -destination artifacts/ServerConsole/
|
|
#service
|
|
- ps: Copy-Item -path "src/Tgstation.Server.Host.Service/bin/$env:CONFIGURATION/net472/win" -destination artifacts/ServerService -recurse
|
|
- ps: Copy-Item -path "artifacts/ServerHost" -destination artifacts/ServerService/lib/Default -recurse
|
|
- ps: Move-Item -path artifacts/ServerService/lib/Default/appsettings.json -destination artifacts/ServerService/
|
|
- ps: Remove-Item artifacts/ServerHost/appsettings.json
|
|
#deploy stuff
|
|
- ps: build/prep_deployment.ps1
|
|
deploy:
|
|
- provider: GitHub
|
|
release: "tgstation-server-v$(TGSVersion)"
|
|
description: "$(TGSReleaseNotes)"
|
|
auth_token:
|
|
secure: lJNGAXwiB5HlWdthz3K4PetqpTG5IEAyRgKaiKxFMQ8HW8CcOjRtB97B05op7BsK
|
|
artifact: ServerConsole,ServerService,ServerUpdatePackage,DMAPI,SwaggerSpec
|
|
draft: $(TGSDraftNotes)
|
|
prerelease: false
|
|
on:
|
|
TGSDeploy: "Do it."
|
|
- provider: GitHub
|
|
release: "api-v$(APIVersion)"
|
|
description: "$(APIReleaseNotes)"
|
|
auth_token:
|
|
secure: lJNGAXwiB5HlWdthz3K4PetqpTG5IEAyRgKaiKxFMQ8HW8CcOjRtB97B05op7BsK
|
|
artifact: SwaggerSpec
|
|
draft: false
|
|
prerelease: false
|
|
on:
|
|
APIDeploy: "Do it."
|
|
- provider: GitHub
|
|
release: "dmapi-v$(DMVersion)"
|
|
description: "$(DMReleaseNotes)"
|
|
auth_token:
|
|
secure: lJNGAXwiB5HlWdthz3K4PetqpTG5IEAyRgKaiKxFMQ8HW8CcOjRtB97B05op7BsK
|
|
artifact: DMAPI
|
|
draft: false
|
|
prerelease: false
|
|
on:
|
|
DMDeploy: "Do it."
|
|
- provider: NuGet
|
|
api_key:
|
|
secure: DzllxD27WDdbXf/U9myiLcu/DBlJBk1rlrPv629JHluIsffaJUbY1L+TRYo5gwjf
|
|
artifact: /.*\.nupkg/
|
|
on:
|
|
NugetDeploy: "Do it."
|