Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add additional branch triggers #30

Merged
merged 3 commits into from
Jun 22, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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']))