From b0211029ad7e2319cdaf0633f4071529b85c7a6b Mon Sep 17 00:00:00 2001 From: gclendenning <64431984+gclendenning@users.noreply.github.com> Date: Fri, 26 May 2023 12:04:49 +0100 Subject: [PATCH 1/3] Add additional branch triggers --- azure-pipelines.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 6883de0..b92cd9b 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -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 @@ -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'])) \ No newline at end of file + condition: and(succeeded(), eq(variables['Build.SourceBranchName'], variables['packageVersionFormatted'])) From df1b34d8c03eefadbcf52a294cda1c5070b739b6 Mon Sep 17 00:00:00 2001 From: gclendenning <64431984+gclendenning@users.noreply.github.com> Date: Wed, 7 Jun 2023 07:29:29 +0100 Subject: [PATCH 2/3] Fix coverage argument --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index b92cd9b..0f5f1c4 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -70,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: | From 769a89c8596bec3fee4785bf93b6ef181b47b252 Mon Sep 17 00:00:00 2001 From: gclendenning <64431984+gclendenning@users.noreply.github.com> Date: Fri, 16 Jun 2023 19:28:24 +0100 Subject: [PATCH 3/3] Ensure all tests pass before release --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 0f5f1c4..f7d045a 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -88,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