Move tools for ci/cd in the tools directory

This commit is contained in:
Andrea Spadaccini 2019-07-29 17:26:22 +01:00
Родитель 6e656a3e7e
Коммит 1980f43b66
3 изменённых файлов: 9 добавлений и 7 удалений

Просмотреть файл

@ -19,13 +19,13 @@ jobs:
- task: PowerShell@2
displayName: Restore
inputs:
filePath: './restore.ps1'
filePath: 'tools/restore.ps1'
pwsh: true
- task: PowerShell@2
displayName: Test
inputs:
filePath: './run-tests.ps1'
filePath: 'tools/run-tests.ps1'
pwsh: true
- job: WindowsPowershell
@ -35,9 +35,9 @@ jobs:
- task: PowerShell@2
displayName: Restore
inputs:
filePath: './restore.ps1'
filePath: 'tools/restore.ps1'
- task: PowerShell@2
displayName: Test
inputs:
filePath: './run-tests.ps1'
filePath: 'tools/run-tests.ps1'

Просмотреть файл

@ -2,12 +2,13 @@ param (
[switch] $Clean,
[switch] $List = $false
)
$outputDir = "External"
$parentDir = Split-Path -Parent (Split-Path -Parent $PSCommandPath)
$outputDir = Join-Path $parentDir -ChildPath "External"
if ($Clean) {
Remove-Item -Path $outputDir -Recurse -Force
} else {
dotnet restore --packages $outputDir --force
dotnet restore $parentDir --packages $outputDir --force
if (-not $?) {
Write-Error "Could not install packages." -ErrorAction Stop

Просмотреть файл

@ -1,7 +1,8 @@
# Mostly for use of CI/CD. Install Pester and run tests.
$parentDir = Split-Path -Parent (Split-Path -Parent $PSCommandPath)
Install-Module Pester -Force -Scope CurrentUser
$FailedTests = Invoke-Pester -EnableExit
$FailedTests = Invoke-Pester $parentDir -EnableExit
if ($FailedTests -gt 0) {
Write-Error "Error: $FailedTests Pester tests failed."
exit $FailedTests