Skip to content

Commit

Permalink
ci(azure-pipelines): change steps order
Browse files Browse the repository at this point in the history
  • Loading branch information
xaviml committed Jul 12, 2020
1 parent dfcfcea commit 98dd735
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@ steps:
inputs:
versionSpec: '$(python.version)'
displayName: 'Prepare Python $(python.version)'
- task: ArchiveFiles@2
condition: and(startsWith(variables['Build.SourceBranch'], 'refs/tags/v'), eq(variables['python.version'], '3.8'))
displayName: Zipping apps/controllerx folder
inputs:
rootFolderOrFile: '$(System.DefaultWorkingDirectory)/apps/controllerx'
includeRootFolder: false
archiveType: 'zip'
archiveFile: '$(Build.ArtifactStagingDirectory)/controllerx.zip'
- script: pip install pipenv
displayName: 'Install pipenv'
- script: python -m pipenv install --dev
Expand All @@ -41,25 +49,15 @@ steps:
- script: pipenv run pytest tests --doctest-modules --junitxml=junit/test-results.xml --cov=apps --cov-report=xml --cov-report=html
displayName: 'Tests (pytest)'
- task: PublishCodeCoverageResults@1
displayName: Publish code coverage
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: '$(System.DefaultWorkingDirectory)/**/coverage.xml'
# We run the GitHub release only if it is a tag and the python version is 3.8
# so we only execute this once.
- task: DeleteFiles@1
condition: and(startsWith(variables['Build.SourceBranch'], 'refs/tags/v'), eq(variables['python.version'], '3.8'))
inputs:
Contents: 'apps/controllerx/controllerx.egg-info/'
- task: ArchiveFiles@2
condition: and(startsWith(variables['Build.SourceBranch'], 'refs/tags/v'), eq(variables['python.version'], '3.8'))
inputs:
rootFolderOrFile: '$(System.DefaultWorkingDirectory)/apps/controllerx'
includeRootFolder: false
archiveType: 'zip'
archiveFile: '$(Build.ArtifactStagingDirectory)/controllerx.zip'
- task: GithubRelease@0
condition: and(startsWith(variables['Build.SourceBranch'], 'refs/tags/v'), eq(variables['python.version'], '3.8'))
displayName: 'Create GitHub Release'
displayName: Create GitHub Release
inputs:
gitHubConnection: github.com_xaviml
repositoryName: xaviml/controllerx
Expand Down

0 comments on commit 98dd735

Please sign in to comment.