From bc129fcb1a197bc10bbab348a55b3ae4091487b7 Mon Sep 17 00:00:00 2001 From: Mihai Cara Date: Fri, 14 Apr 2023 04:28:15 -0400 Subject: [PATCH] Fix azure template for codecov --- azure-pipelines.yml | 4 ++-- azure-templates.yml | 20 +++++++++++++++----- setup.py | 1 - 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index d95d439..64b9cb5 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -27,7 +27,7 @@ jobs: - job: 'PEP8' pool: - vmImage: 'Ubuntu-18.04' + vmImage: 'ubuntu-latest' steps: - task: UsePythonVersion@0 @@ -44,7 +44,7 @@ jobs: - job: 'Publish' dependsOn: 'Linux' pool: - vmImage: 'Ubuntu-18.04' + vmImage: 'ubuntu-latest' steps: - task: UsePythonVersion@0 diff --git a/azure-templates.yml b/azure-templates.yml index d0a4f2d..2cd87bd 100644 --- a/azure-templates.yml +++ b/azure-templates.yml @@ -2,11 +2,11 @@ jobs: - job: ${{ format(parameters.name) }} pool: ${{ if eq(parameters.os, 'windows') }}: - vmImage: windows-2019 + vmImage: windows-latest ${{ if eq(parameters.os, 'macos') }}: - vmImage: macOS-10.15 + vmImage: macOS-latest ${{ if eq(parameters.os, 'linux') }}: - vmImage: ubuntu-18.04 + vmImage: ubuntu-latest strategy: matrix: @@ -49,10 +49,20 @@ jobs: displayName: run test - bash: | - codecov -t $codecov_token + curl -Os https://uploader.codecov.io/latest/${{parameters.os}}/codecov + chmod +x codecov + ./codecov -t $codecov_token env: codecov_token: $(CODECOV_TOKEN) - displayName: codecov upload + condition: ne( variables['Agent.OS'], 'Windows_NT' ) + displayName: codecov upload on Linux/Darwin + + - powershell: | + $ProgressPreference = 'SilentlyContinue' + Invoke-WebRequest -Uri https://uploader.codecov.io/latest/windows/codecov.exe -Outfile codecov.exe + .\codecov.exe -t ${CODECOV_TOKEN} + condition: eq( variables['Agent.OS'], 'Windows_NT' ) + displayName: codecov upload on Windows - task: PublishTestResults@2 condition: succeededOrFailed() diff --git a/setup.py b/setup.py index 12f6614..de98f3c 100755 --- a/setup.py +++ b/setup.py @@ -57,7 +57,6 @@ 'pytest', 'pytest-cov', 'pytest-doctestplus', - 'codecov', ] DOCS_REQUIRE = [