diff --git a/appveyor-woa.yml b/appveyor-woa.yml index 822381870ad0..b5823be68c08 100644 --- a/appveyor-woa.yml +++ b/appveyor-woa.yml @@ -335,8 +335,11 @@ for: # - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) - if exist electron\junit\test-results-main.xml ( appveyor-retry appveyor PushArtifact electron\junit\test-results-main.xml ) - ps: | - $env:DD_GIT_COMMIT_SHA = $env:APPVEYOR_REPO_COMMIT - $env:DD_GIT_BRANCH = $env:APPVEYOR_PULL_REQUEST_HEAD_REPO_BRANCH - $env:DD_TAGS = "os.architecture:$env:TARGET_ARCH,os.family:windows,os.platform:win32" - C:\projects\src\electron\datadog-ci.exe junit upload --verbose C:\projects\src\electron\junit\test-results-main.xml - + if ($env:RUN_TESTS -eq 'true') { + $env:DD_GIT_COMMIT_SHA = $env:APPVEYOR_REPO_COMMIT + $env:DD_GIT_BRANCH = $env:APPVEYOR_PULL_REQUEST_HEAD_REPO_BRANCH + $env:DD_TAGS = "os.architecture:$env:TARGET_ARCH,os.family:windows,os.platform:win32" + if (Test-Path -Path "C:\projects\src\electron\junit\test-results-main.xml") { + C:\projects\src\electron\datadog-ci.exe junit upload --verbose C:\projects\src\electron\junit\test-results-main.xml + } + } diff --git a/appveyor.yml b/appveyor.yml index 18055fb28204..9df8a5b83ce7 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -330,7 +330,11 @@ for: # - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) - if exist electron\junit\test-results-main.xml ( appveyor-retry appveyor PushArtifact electron\junit\test-results-main.xml ) - ps: | - $env:DD_GIT_COMMIT_SHA = $env:APPVEYOR_REPO_COMMIT - $env:DD_GIT_BRANCH = $env:APPVEYOR_PULL_REQUEST_HEAD_REPO_BRANCH - $env:DD_TAGS = "os.architecture:$env:TARGET_ARCH,os.family:windows,os.platform:win32" - C:\Users\appveyor\AppData\Roaming\npm\datadog-ci.ps1 junit upload --verbose C:\projects\src\electron\junit\test-results-main.xml + if ($env:RUN_TESTS -eq 'true') { + $env:DD_GIT_COMMIT_SHA = $env:APPVEYOR_REPO_COMMIT + $env:DD_GIT_BRANCH = $env:APPVEYOR_PULL_REQUEST_HEAD_REPO_BRANCH + $env:DD_TAGS = "os.architecture:$env:TARGET_ARCH,os.family:windows,os.platform:win32" + if (Test-Path -Path "C:\projects\src\electron\junit\test-results-main.xml") { + C:\Users\appveyor\AppData\Roaming\npm\datadog-ci.ps1 junit upload --verbose C:\projects\src\electron\junit\test-results-main.xml + } + }