From 398445c73daef1b68226f91ac6736a42bfa79bb8 Mon Sep 17 00:00:00 2001 From: OCram85 Date: Fri, 2 Oct 2020 15:05:19 +0200 Subject: [PATCH] trigger CodeCov from drone.io build (SkipLint) --- .drone.yml | 1 + appveyor.yml | 6 ------ tools/DroneIO.psm1 | 2 +- 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/.drone.yml b/.drone.yml index d3710c5..88d3859 100644 --- a/.drone.yml +++ b/.drone.yml @@ -23,3 +23,4 @@ steps: commands: - pwsh -NonInteractive -c "& {Import-Module './tools/DroneIO.psm1'; Invoke-InstallDependencies}" - pwsh -NonInteractive -c "& {Import-Module './tools/DroneIO.psm1'; Invoke-UnitTests}" + - bash <(curl -s https://codecov.io/bash) diff --git a/appveyor.yml b/appveyor.yml index 394f27c..5b9615d 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -48,12 +48,6 @@ test_script: else { 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: #- provider: GitHub diff --git a/tools/DroneIO.psm1 b/tools/DroneIO.psm1 index 21eadf9..acc8596 100644 --- a/tools/DroneIO.psm1 +++ b/tools/DroneIO.psm1 @@ -80,7 +80,7 @@ function Invoke-UnitTests { Write-Host '===== Running Pester =====' -ForegroundColor Black -BackgroundColor Yellow $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) { throw ('{0} tests failed!' -f $TestResults.FailedCount)