Skip to content

Commit

Permalink
Merge pull request #24 from mcara/fix-azure-codecov
Browse files Browse the repository at this point in the history
Fix azure template for codecov
  • Loading branch information
mcara authored Apr 14, 2023
2 parents b763d4c + bc129fc commit 59b36c3
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 8 deletions.
4 changes: 2 additions & 2 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:

- job: 'PEP8'
pool:
vmImage: 'Ubuntu-18.04'
vmImage: 'ubuntu-latest'

steps:
- task: UsePythonVersion@0
Expand All @@ -44,7 +44,7 @@ jobs:
- job: 'Publish'
dependsOn: 'Linux'
pool:
vmImage: 'Ubuntu-18.04'
vmImage: 'ubuntu-latest'

steps:
- task: UsePythonVersion@0
Expand Down
20 changes: 15 additions & 5 deletions azure-templates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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()
Expand Down
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@
'pytest',
'pytest-cov',
'pytest-doctestplus',
'codecov',
]

DOCS_REQUIRE = [
Expand Down

0 comments on commit 59b36c3

Please sign in to comment.