Skip to content

Commit

Permalink
Configure CI (no. 124)
Browse files Browse the repository at this point in the history
  • Loading branch information
cafour committed Jun 4, 2021
1 parent a32df00 commit c86dd0d
Showing 1 changed file with 21 additions and 30 deletions.
51 changes: 21 additions & 30 deletions ci/windows/run.ps1
Expand Up @@ -12,23 +12,19 @@ if ($null -eq $configuration) {
Write-Host "ROOT=$ROOT"
Write-Host "CONFIGURATION=$CONFIGURATION"

icm {
cd $root\src\DotVVM.Framework
npm ci --cache $root\.npm --prefer-offline
npm run build
}
Set-Location $root\src\DotVVM.Framework
npm ci --cache $root\.npm --prefer-offline
npm run build
if ($LASTEXITCODE -ne 0) {
Write-Host "npm build failed"
exit 1
}

$sln = "$root\ci\windows\Windows.sln"
$nuget = "$root\src\packages\"
icm {
cd $root
nuget restore $sln -PackagesDirectory $nuget
dotnet restore $sln --packages $nuget
}
Set-Location $root
nuget restore $sln -PackagesDirectory $nuget
dotnet restore $sln --packages $nuget
if ($LASTEXITCODE -ne 0) {
Write-Host "nuget restore failed"
exit 1
Expand All @@ -43,27 +39,20 @@ if ($LASTEXITCODE -ne 0) {
exit 1
}

icm {
Import-Module IISAdministration -UseWindowsPowerShell
Import-Module IISAdministration -UseWindowsPowerShell

icacls $root/artifacts/ /grant "IIS_IUSRS:(OI)(CI)F"
New-IISSite -Name dotvvm.owin `
-PhysicalPath $root\artifacts\DotVVM.Samples.BasicSamples.Owin `
-BindingInformation "*:5407:"
icacls $root/artifacts/ /grant "IIS_IUSRS:(OI)(CI)F"
New-IISSite -Name dotvvm.owin `
-PhysicalPath $root\artifacts\DotVVM.Samples.BasicSamples.Owin `
-BindingInformation "*:5407:"

New-IISSite -Name dotvvm.owin.api `
-PhysicalPath $root\artifacts\DotVVM.Samples.BasicSamples.Api.Owin `
-BindingInformation "*:5002:"

Copy-Item -Recurse `
$root\src\DotVVM.Samples.BasicSamples.Owin `
$root\artifacts
}
New-IISSite -Name dotvvm.owin.api `
-PhysicalPath $root\artifacts\DotVVM.Samples.BasicSamples.Api.Owin `
-BindingInformation "*:5002:"

if ($LASTEXITCODE -ne 0) {
Write-Host "IIS setup failed"
exit 1
}
Copy-Item -Recurse `
$root\src\DotVVM.Samples.BasicSamples.Owin `
$root\artifacts

Copy-Item `
$root\src\DotVVM.Samples.Tests\Profiles\seleniumconfig.owin.chrome.json `
Expand All @@ -72,8 +61,10 @@ Copy-Item `
dotnet test $root\src\DotVVM.Samples.Tests `
--configuration $configuration `
--logger trx `
--results-directory $root\artifacts\test; `
icm { Stop-Process -Name chrome; Stop-Process -Name chromedriver }
--results-directory $root\artifacts\test

Stop-Process -Name chrome
Stop-Process -Name chromedriver

Remove-IISSite -Force -Name dotvvm.owin
Remove-IISSite -Force -Name dotvvm.owin.api

0 comments on commit c86dd0d

Please sign in to comment.