Skip to content

Commit

Permalink
Merge pull request #30 from gclendenning/main
Browse files Browse the repository at this point in the history
Add additional branch triggers
  • Loading branch information
jc-healy committed Jun 22, 2023
2 parents bfef5c1 + 769a89c commit b17db79
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
# Trigger a build when there is a push to the main branch or a tag starts with release-
trigger:
branches:
include:
- main
- master
tags:
include:
- release-*

# Trigger a build when there is a pull request to the main branch
# Ignore PRs that are just updating the docs
pr:
branches:
include:
- main
- master
exclude:
- doc/*
- README.rst
Expand Down Expand Up @@ -65,7 +70,7 @@ stages:
displayName: 'Install package'
- script: |
pytest thisnotthat/tests --show-capture=no -v --disable-warnings --junitxml=junit/test-results.xml --cov=glasbey/ --cov-report=xml --cov-report=html
pytest thisnotthat/tests --show-capture=no -v --disable-warnings --junitxml=junit/test-results.xml --cov=thisnotthat/ --cov-report=xml --cov-report=html
displayName: 'Run tests'
- bash: |
Expand All @@ -83,7 +88,7 @@ stages:

- stage: BuildPublishArtifact
dependsOn: RunAllTests
condition: and(startsWith(variables['Build.SourceBranch'], 'refs/tags/release-'), eq(variables.triggeredByPullRequest, false))
condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/release-'), eq(variables.triggeredByPullRequest, false))
jobs:
- job: BuildArtifacts
displayName: Build source dists and wheels
Expand Down Expand Up @@ -131,4 +136,4 @@ stages:
pip install twine
twine upload --repository pypi --config-file $(PYPIRC_CONFIG.secureFilePath) dist/*
displayName: 'Upload to PyPI'
condition: and(succeeded(), eq(variables['Build.SourceBranchName'], variables['packageVersionFormatted']))
condition: and(succeeded(), eq(variables['Build.SourceBranchName'], variables['packageVersionFormatted']))

0 comments on commit b17db79

Please # to comment.