Modernize Build Pipeline #48
@ -23,3 +23,4 @@ steps:
|
|||||||
commands:
|
commands:
|
||||||
- pwsh -NonInteractive -c "& {Import-Module './tools/DroneIO.psm1'; Invoke-InstallDependencies}"
|
- pwsh -NonInteractive -c "& {Import-Module './tools/DroneIO.psm1'; Invoke-InstallDependencies}"
|
||||||
- pwsh -NonInteractive -c "& {Import-Module './tools/DroneIO.psm1'; Invoke-UnitTests}"
|
- pwsh -NonInteractive -c "& {Import-Module './tools/DroneIO.psm1'; Invoke-UnitTests}"
|
||||||
|
- bash <(curl -s https://codecov.io/bash)
|
||||||
|
@ -48,12 +48,6 @@ test_script:
|
|||||||
else {
|
else {
|
||||||
Write-Warning "No CoverallsToken found. This build seems to be triggered by a PR. Skipping this step..."
|
Write-Warning "No CoverallsToken found. This build seems to be triggered by a PR. Skipping this step..."
|
||||||
}
|
}
|
||||||
if ($null -ne $Env:CodeCovToken) {
|
|
||||||
Invoke-CodeCove
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
Write-Warning "No CodeCovToken found. This build seems to be triggered by a PR. Skipping this step..."
|
|
||||||
}
|
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
#- provider: GitHub
|
#- provider: GitHub
|
||||||
|
@ -80,7 +80,7 @@ function Invoke-UnitTests {
|
|||||||
|
|
||||||
Write-Host '===== Running Pester =====' -ForegroundColor Black -BackgroundColor Yellow
|
Write-Host '===== Running Pester =====' -ForegroundColor Black -BackgroundColor Yellow
|
||||||
$TestFiles = Get-ChildItem -Path (Join-Path -Path '.' -ChildPath './tests/*.Tests.ps1') -Recurse | Sort-Object -Property Name
|
$TestFiles = Get-ChildItem -Path (Join-Path -Path '.' -ChildPath './tests/*.Tests.ps1') -Recurse | Sort-Object -Property Name
|
||||||
$TestResults = Invoke-Pester -Script $TestFiles -ExcludeTag 'Disabled' -PassThru
|
$TestResults = Invoke-Pester -Path $testFiles -CodeCoverage $srcFiles -PassThru -CodeCoverageOutputFile "./coverage.xml" -CodeCoverageOutputFileEncoding ascii -CodeCoverageOutputFileFormat JaCoCo
|
||||||
|
|
||||||
if ($TestResults.FailedCount -gt 0) {
|
if ($TestResults.FailedCount -gt 0) {
|
||||||
throw ('{0} tests failed!' -f $TestResults.FailedCount)
|
throw ('{0} tests failed!' -f $TestResults.FailedCount)
|
||||||
|
Loading…
Reference in New Issue
Block a user