Enable custom dotnet for appveyor (#931)

* Enable dotnet channel for appveyor

* Second try

* Third try
This commit is contained in:
Łukasz Domeradzki
2018-10-29 22:58:14 +01:00
committed by GitHub
parent 362f4db10d
commit 15292fda27

View File

@@ -2,13 +2,13 @@ version: '{build}-{branch}'
pull_requests:
do_not_increment_build_number: true
skip_branch_with_pr: true
image:
- Visual Studio 2017
- Visual Studio 2017 Preview
image: Visual Studio 2017
configuration: Release
clone_depth: 10
environment:
DOTNET_CHANNEL: 2.1
DOTNET_CLI_TELEMETRY_OPTOUT: true
DOTNET_INSTALL_DIR: tools\dotnet
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
NET_CORE_VERSION: netcoreapp2.1
NET_FRAMEWORK_VERSION: net472
@@ -32,6 +32,11 @@ install:
if ($LastExitCode -ne 0) {
throw "Last command failed."
}
if ($env:DOTNET_CHANNEL) {
&([scriptblock]::Create((Invoke-WebRequest -Uri 'https://dot.net/v1/dotnet-install.ps1'))) -Channel "$env:DOTNET_CHANNEL" -InstallDir "$env:DOTNET_INSTALL_DIR" -NoPath
$env:Path = "$pwd\$env:DOTNET_INSTALL_DIR;$env:Path"
}
before_build:
- pwsh: >-
Set-StrictMode -Version Latest
@@ -41,6 +46,11 @@ before_build:
$ProgressPreference = 'SilentlyContinue'
if (Test-Path -Path "$env:DOTNET_INSTALL_DIR" -PathType Container) {
$env:Path = "$pwd\$env:DOTNET_INSTALL_DIR;$env:Path"
}
dotnet --info
@@ -56,6 +66,11 @@ build_script:
$ProgressPreference = 'SilentlyContinue'
if (Test-Path -Path "$env:DOTNET_INSTALL_DIR" -PathType Container) {
$env:Path = "$pwd\$env:DOTNET_INSTALL_DIR;$env:Path"
}
Push-Location -Path ASF-ui
@@ -93,6 +108,11 @@ test_script:
$ProgressPreference = 'SilentlyContinue'
if (Test-Path -Path "$env:DOTNET_INSTALL_DIR" -PathType Container) {
$env:Path = "$pwd\$env:DOTNET_INSTALL_DIR;$env:Path"
}
dotnet test ArchiSteamFarm.Tests -c "$env:CONFIGURATION" -f "$env:NET_CORE_VERSION" -o 'out\source' /nologo
@@ -108,6 +128,11 @@ after_test:
$ProgressPreference = 'SilentlyContinue'
if (Test-Path -Path "$env:DOTNET_INSTALL_DIR" -PathType Container) {
$env:Path = "$pwd\$env:DOTNET_INSTALL_DIR;$env:Path"
}
$PublishBlock = {
param($variant)