From 60ff4a663c8172dca6d6b37f00fbcd6e7a669fa8 Mon Sep 17 00:00:00 2001 From: Brian Cristante Date: Fri, 24 Aug 2018 16:09:32 -0400 Subject: [PATCH 01/19] Add Azure Pipelines configuration --- .azure-pipelines/jobs/package.yml | 37 ++++++++++ .azure-pipelines/jobs/test.yml | 73 +++++++++++++++++++ .azure-pipelines/linux.yml | 8 ++ .azure-pipelines/macos.yml | 8 ++ .../steps/install-dependencies.yml | 3 + .azure-pipelines/steps/run-tests-windows.yml | 37 ++++++++++ .azure-pipelines/steps/run-tests.yml | 24 ++++++ .azure-pipelines/windows.yml | 8 ++ MANIFEST.in | 1 + README.rst | 9 +++ 10 files changed, 208 insertions(+) create mode 100644 .azure-pipelines/jobs/package.yml create mode 100644 .azure-pipelines/jobs/test.yml create mode 100644 .azure-pipelines/linux.yml create mode 100644 .azure-pipelines/macos.yml create mode 100644 .azure-pipelines/steps/install-dependencies.yml create mode 100644 .azure-pipelines/steps/run-tests-windows.yml create mode 100644 .azure-pipelines/steps/run-tests.yml create mode 100644 .azure-pipelines/windows.yml diff --git a/.azure-pipelines/jobs/package.yml b/.azure-pipelines/jobs/package.yml new file mode 100644 index 00000000000..f8e9d7abd06 --- /dev/null +++ b/.azure-pipelines/jobs/package.yml @@ -0,0 +1,37 @@ +parameters: + vmImage: + +jobs: +- job: Package + dependsOn: + - Test_Primary + - Test_Secondary + pool: + vmImage: ${{ parameters.vmImage }} + + steps: + - task: UsePythonVersion@0 + displayName: Use Python 3 latest + inputs: + versionSpec: '3' + + - bash: pip install setuptools tox wheel invoke towncrier + displayName: Install dependencies + + - bash: invoke generate.authors + displayName: Generate AUTHORS.txt + + - bash: invoke generate.news --yes + displayName: Generate NEWS.rst + + - bash: tox -e packaging + displayName: Run Tox packaging + + - bash: python setup.py sdist bdist_wheel + displayName: Create sdist and wheel + + - task: PublishBuildArtifacts@1 + displayName: 'Publish Artifact: dist' + inputs: + pathtoPublish: dist + artifactName: dist diff --git a/.azure-pipelines/jobs/test.yml b/.azure-pipelines/jobs/test.yml new file mode 100644 index 00000000000..47a286c0e7a --- /dev/null +++ b/.azure-pipelines/jobs/test.yml @@ -0,0 +1,73 @@ +parameters: + vmImage: + +jobs: +- job: Test_Primary + displayName: Test Primary + + pool: + vmImage: ${{ parameters.vmImage }} + strategy: + matrix: + Python27: + python.version: '2.7' + python.architecture: x64 + Python36: + python.version: '3.6' + python.architecture: x64 + maxParallel: 2 + + steps: + - ${{ if eq(parameters.vmImage, 'vs2017-win2017') }}: + - template: ../steps/run-tests-windows.yml + parameters: + runIntegrationTests: true + + - ${{ if ne(parameters.vmImage, 'vs2017-win2017') }}: + - template: ../steps/run-tests.yml + +- job: Test_Secondary + displayName: Test Secondary + # Run after Test_Primary so we don't devour time and jobs if tests are going to fail + dependsOn: Test_Primary + + pool: + vmImage: ${{ parameters.vmImage }} + strategy: + matrix: + Python34: + python.version: '3.4' + python.architecture: x64 + Python35: + python.version: '3.5' + python.architecture: x64 + Python37: + python.version: '3.7' + python.architecture: x64 + # On Windows, test x86 builds + ${{ if eq(parameters.vmImage, 'vs2017-win2017') }}: + Python27-x86: + python.version: '2.7' + python.architecture: x86 + Python34-x86: + python.version: '3.4' + python.architecture: x86 + Python35-x86: + python.version: '3.5' + python.architecture: x86 + Python36-x86: + python.version: '3.6' + python.architecture: x86 + Python37-x86: + python.version: '3.7' + python.architecture: x86 + maxParallel: 5 + + steps: + - ${{ if eq(parameters.vmImage, 'vs2017-win2017') }}: + - template: ../steps/run-tests-windows.yml + parameters: + runIntegrationTests: false + + - ${{ if ne(parameters.vmImage, 'vs2017-win2017') }}: + - template: ../steps/run-tests.yml diff --git a/.azure-pipelines/linux.yml b/.azure-pipelines/linux.yml new file mode 100644 index 00000000000..6965a15fc6d --- /dev/null +++ b/.azure-pipelines/linux.yml @@ -0,0 +1,8 @@ +jobs: +- template: jobs/test.yml + parameters: + vmImage: ubuntu-16.04 + +- template: jobs/package.yml + parameters: + vmImage: ubuntu-16.04 diff --git a/.azure-pipelines/macos.yml b/.azure-pipelines/macos.yml new file mode 100644 index 00000000000..7408a38840f --- /dev/null +++ b/.azure-pipelines/macos.yml @@ -0,0 +1,8 @@ +jobs: +- template: jobs/test.yml + parameters: + vmImage: xcode9-macos10.13 + +- template: jobs/package.yml + parameters: + vmImage: xcode9-macos10.13 diff --git a/.azure-pipelines/steps/install-dependencies.yml b/.azure-pipelines/steps/install-dependencies.yml new file mode 100644 index 00000000000..8946a5568d2 --- /dev/null +++ b/.azure-pipelines/steps/install-dependencies.yml @@ -0,0 +1,3 @@ +steps: +- bash: pip install --upgrade setuptools tox + displayName: Install dependencies \ No newline at end of file diff --git a/.azure-pipelines/steps/run-tests-windows.yml b/.azure-pipelines/steps/run-tests-windows.yml new file mode 100644 index 00000000000..f01edbe3428 --- /dev/null +++ b/.azure-pipelines/steps/run-tests-windows.yml @@ -0,0 +1,37 @@ +parameters: + runIntegrationTests: + +steps: +- task: UsePythonVersion@0 + displayName: Use Python $(python.version) + inputs: + versionSpec: '$(python.version)' + architecture: '$(python.architecture)' + +- template: install-dependencies.yml + +- script: tox -e py -- -m unit -n 3 --junit-xml=junit/unit-test.xml + displayName: Tox run unit tests + +- ${{ if eq(parameters.runIntegrationTests, 'true') }}: + - powershell: | + # Fix Git SSL errors + pip install certifi tox + python -m certifi > cacert.txt + $env:GIT_SSL_CAINFO = $(Get-Content cacert.txt) + + # Shorten paths to get under MAX_PATH or else integration tests will fail + # https://bugs.python.org/issue18199 + subst T: $env:TEMP + $env:TEMP = "T:\" + $env:TMP = "T:\" + + tox -e py -- -m integration -n 3 --duration=5 --junit-xml=junit/integration-test.xml + displayName: Tox run integration tests + +- task: PublishTestResults@2 + displayName: Publish Test Results + inputs: + testResultsFiles: junit/*.xml + testRunTitle: 'Python $(python.version)' + condition: succeededOrFailed() diff --git a/.azure-pipelines/steps/run-tests.yml b/.azure-pipelines/steps/run-tests.yml new file mode 100644 index 00000000000..588445b9942 --- /dev/null +++ b/.azure-pipelines/steps/run-tests.yml @@ -0,0 +1,24 @@ +steps: +- task: UsePythonVersion@0 + displayName: Use Python $(python.version) + inputs: + versionSpec: '$(python.version)' + +- template: install-dependencies.yml + +- script: tox -e py -- -m unit --junit-xml=junit/unit-test.xml + displayName: Tox run unit tests + +# Run integration tests in two groups so we will fail faster if there is a failure in the first group +- script: tox -e py -- -m integration -n 4 --duration=5 -k "not test_install" --junit-xml=junit/integration-test-group0.xml + displayName: Tox run Group 0 integration tests + +- script: tox -e py -- -m integration -n 4 --duration=5 -k "test_install" --junit-xml=junit/integration-test-group1.xml + displayName: Tox run Group 1 integration tests + +- task: PublishTestResults@2 + displayName: Publish Test Results + inputs: + testResultsFiles: junit/*.xml + testRunTitle: 'Python $(python.version)' + condition: succeededOrFailed() \ No newline at end of file diff --git a/.azure-pipelines/windows.yml b/.azure-pipelines/windows.yml new file mode 100644 index 00000000000..21f30748428 --- /dev/null +++ b/.azure-pipelines/windows.yml @@ -0,0 +1,8 @@ +jobs: +- template: jobs/test.yml + parameters: + vmImage: vs2017-win2017 + +- template: jobs/package.yml + parameters: + vmImage: vs2017-win2017 diff --git a/MANIFEST.in b/MANIFEST.in index 0191e0d0a0a..36d9bd8a949 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -23,6 +23,7 @@ exclude src/pip/_vendor/six/moves recursive-exclude src/pip/_vendor *.pyi prune .github +prune .azure-pipelines prune docs/build prune news prune tasks diff --git a/README.rst b/README.rst index 1d580ef9df5..faba51f52f7 100644 --- a/README.rst +++ b/README.rst @@ -15,6 +15,15 @@ The `PyPA recommended`_ tool for installing Python packages. .. image:: https://readthedocs.org/projects/pip/badge/?version=latest :target: https://pip.pypa.io/en/latest +.. image:: https://pypa.visualstudio.com/pip/_apis/build/status/Pip%20CI%20(Windows) + :target: https://pypa.visualstudio.com/pip/_build/latest?definitionId=6 + +.. image:: https://pypa.visualstudio.com/pip/_apis/build/status/Pip%20CI%20(macOS) + :target: https://pypa.visualstudio.com/pip/_build/latest?definitionId=7 + +.. image:: https://pypa.visualstudio.com/pip/_apis/build/status/Pip%20CI%20(Linux) + :target: https://pypa.visualstudio.com/pip/_build/latest?definitionId=4 + * `Installation`_ * `Documentation`_ * `Changelog`_ From be3fb9366f4ca895448d92bef1df8759dae43f95 Mon Sep 17 00:00:00 2001 From: Brian Cristante Date: Sat, 15 Sep 2018 10:31:48 -0700 Subject: [PATCH 02/19] Use --yes flag to generate NEWS.rst during CI --- tasks/generate.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tasks/generate.py b/tasks/generate.py index 69960231c3b..2357897072d 100644 --- a/tasks/generate.py +++ b/tasks/generate.py @@ -35,11 +35,13 @@ def authors(ctx): @invoke.task -def news(ctx, draft=False): +def news(ctx, draft=False, yes=False): print("[generate.news] Generating NEWS") args = [] if draft: args.append("--draft") + if yes: + args.append("--yes") ctx.run("towncrier {}".format(" ".join(args))) From ef94c93afef8cc2ae3a65b6ff1f8189af0ee66be Mon Sep 17 00:00:00 2001 From: Brian Cristante Date: Sat, 15 Sep 2018 10:34:12 -0700 Subject: [PATCH 03/19] Add .trivial file for change --- news/5785.trivial | 1 + 1 file changed, 1 insertion(+) create mode 100644 news/5785.trivial diff --git a/news/5785.trivial b/news/5785.trivial new file mode 100644 index 00000000000..56d0bd37ff0 --- /dev/null +++ b/news/5785.trivial @@ -0,0 +1 @@ +Add configuration for CI with Azure Pipelines. \ No newline at end of file From fd490b5da274e6edb0dac1b0dbe2b59df5fc9223 Mon Sep 17 00:00:00 2001 From: Brian Cristante Date: Sat, 15 Sep 2018 10:39:25 -0700 Subject: [PATCH 04/19] Revert "Add .trivial file for change" This reverts commit ef94c93afef8cc2ae3a65b6ff1f8189af0ee66be. dstufft already added the 'trivial' tag to the PR. --- news/5785.trivial | 1 - 1 file changed, 1 deletion(-) delete mode 100644 news/5785.trivial diff --git a/news/5785.trivial b/news/5785.trivial deleted file mode 100644 index 56d0bd37ff0..00000000000 --- a/news/5785.trivial +++ /dev/null @@ -1 +0,0 @@ -Add configuration for CI with Azure Pipelines. \ No newline at end of file From 7dfb765c4eb787435e3bdab6d770b2de8719c359 Mon Sep 17 00:00:00 2001 From: Brian Cristante Date: Mon, 1 Oct 2018 08:16:47 -0400 Subject: [PATCH 05/19] rename YAMLs for pool name --- .azure-pipelines/{linux.yml => ubuntu-16.04.yml} | 0 .azure-pipelines/{windows.yml => vs2017.yml} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename .azure-pipelines/{linux.yml => ubuntu-16.04.yml} (100%) rename .azure-pipelines/{windows.yml => vs2017.yml} (100%) diff --git a/.azure-pipelines/linux.yml b/.azure-pipelines/ubuntu-16.04.yml similarity index 100% rename from .azure-pipelines/linux.yml rename to .azure-pipelines/ubuntu-16.04.yml diff --git a/.azure-pipelines/windows.yml b/.azure-pipelines/vs2017.yml similarity index 100% rename from .azure-pipelines/windows.yml rename to .azure-pipelines/vs2017.yml From ee9d3eae6d635492cc4e45147d0f4a6dde78fc93 Mon Sep 17 00:00:00 2001 From: Brian Cristante Date: Mon, 1 Oct 2018 08:18:17 -0400 Subject: [PATCH 06/19] add pipeline for linux preview --- .azure-pipelines/linux-preview.yml | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 .azure-pipelines/linux-preview.yml diff --git a/.azure-pipelines/linux-preview.yml b/.azure-pipelines/linux-preview.yml new file mode 100644 index 00000000000..d7749b95bb6 --- /dev/null +++ b/.azure-pipelines/linux-preview.yml @@ -0,0 +1,8 @@ +jobs: +- template: jobs/test.yml + parameters: + vmImage: Hosted Linux Preview + +- template: jobs/package.yml + parameters: + vmImage: Hosted Linux Preview From 7a612ee9d88d0736828ece7f238c7e70b4f9cc81 Mon Sep 17 00:00:00 2001 From: Brian Cristante Date: Mon, 1 Oct 2018 08:18:29 -0400 Subject: [PATCH 07/19] add macos preview and macos internal --- .azure-pipelines/macos-preview.yml | 8 ++++++++ .azure-pipelines/macos.yml | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 .azure-pipelines/macos-preview.yml diff --git a/.azure-pipelines/macos-preview.yml b/.azure-pipelines/macos-preview.yml new file mode 100644 index 00000000000..d0162d2659b --- /dev/null +++ b/.azure-pipelines/macos-preview.yml @@ -0,0 +1,8 @@ +jobs: +- template: jobs/test.yml + parameters: + vmImage: Hosted macOS Preview + +- template: jobs/package.yml + parameters: + vmImage: Hosted macOS Preview diff --git a/.azure-pipelines/macos.yml b/.azure-pipelines/macos.yml index 7408a38840f..90627172f0c 100644 --- a/.azure-pipelines/macos.yml +++ b/.azure-pipelines/macos.yml @@ -1,8 +1,8 @@ jobs: - template: jobs/test.yml parameters: - vmImage: xcode9-macos10.13 + vmImage: Hosted Mac Internal - template: jobs/package.yml parameters: - vmImage: xcode9-macos10.13 + vmImage: Hosted Mac Internal From fe76e4f80e9d21bfd5cde46572189fd9a95c7a36 Mon Sep 17 00:00:00 2001 From: Brian Cristante Date: Mon, 1 Oct 2018 08:24:40 -0400 Subject: [PATCH 08/19] Get rid of branching logic based on image name --- .azure-pipelines/jobs/test-windows.yml | 65 ++++++++++++++++ .azure-pipelines/jobs/test.yml | 75 +++++++------------ .../steps/install-dependencies.yml | 2 +- .azure-pipelines/steps/run-tests.yml | 24 ------ 4 files changed, 93 insertions(+), 73 deletions(-) create mode 100644 .azure-pipelines/jobs/test-windows.yml delete mode 100644 .azure-pipelines/steps/run-tests.yml diff --git a/.azure-pipelines/jobs/test-windows.yml b/.azure-pipelines/jobs/test-windows.yml new file mode 100644 index 00000000000..52c782daed5 --- /dev/null +++ b/.azure-pipelines/jobs/test-windows.yml @@ -0,0 +1,65 @@ +parameters: + vmImage: + +jobs: +- job: Test_Primary + displayName: Test Primary + + pool: + vmImage: ${{ parameters.vmImage }} + strategy: + matrix: + Python27: + python.version: '2.7' + python.architecture: x64 + Python36: + python.version: '3.6' + python.architecture: x64 + maxParallel: 2 + + steps: + - template: ../steps/run-tests-windows.yml + parameters: + runIntegrationTests: true + +- job: Test_Secondary + displayName: Test Secondary + # Don't run integration tests for these runs + # Run after Test_Primary so we don't devour time and jobs if tests are going to fail + dependsOn: Test_Primary + + pool: + vmImage: ${{ parameters.vmImage }} + strategy: + matrix: + Python34: + python.version: '3.4' + python.architecture: x64 + Python35: + python.version: '3.5' + python.architecture: x64 + Python37: + python.version: '3.7' + python.architecture: x64 + # This is for Windows, so test x86 builds + Python27-x86: + python.version: '2.7' + python.architecture: x86 + Python34-x86: + python.version: '3.4' + python.architecture: x86 + Python35-x86: + python.version: '3.5' + python.architecture: x86 + Python36-x86: + python.version: '3.6' + python.architecture: x86 + Python37-x86: + python.version: '3.7' + python.architecture: x86 + maxParallel: 5 + + steps: + - template: ../steps/run-tests-windows.yml + parameters: + runIntegrationTests: false diff --git a/.azure-pipelines/jobs/test.yml b/.azure-pipelines/jobs/test.yml index 47a286c0e7a..8bd2192bb4e 100644 --- a/.azure-pipelines/jobs/test.yml +++ b/.azure-pipelines/jobs/test.yml @@ -2,8 +2,8 @@ parameters: vmImage: jobs: -- job: Test_Primary - displayName: Test Primary +- job: Test + displayName: Test pool: vmImage: ${{ parameters.vmImage }} @@ -12,62 +12,41 @@ jobs: Python27: python.version: '2.7' python.architecture: x64 - Python36: - python.version: '3.6' - python.architecture: x64 - maxParallel: 2 - - steps: - - ${{ if eq(parameters.vmImage, 'vs2017-win2017') }}: - - template: ../steps/run-tests-windows.yml - parameters: - runIntegrationTests: true - - - ${{ if ne(parameters.vmImage, 'vs2017-win2017') }}: - - template: ../steps/run-tests.yml - -- job: Test_Secondary - displayName: Test Secondary - # Run after Test_Primary so we don't devour time and jobs if tests are going to fail - dependsOn: Test_Primary - - pool: - vmImage: ${{ parameters.vmImage }} - strategy: - matrix: Python34: python.version: '3.4' python.architecture: x64 Python35: python.version: '3.5' python.architecture: x64 + Python36: + python.version: '3.6' + python.architecture: x64 Python37: python.version: '3.7' python.architecture: x64 - # On Windows, test x86 builds - ${{ if eq(parameters.vmImage, 'vs2017-win2017') }}: - Python27-x86: - python.version: '2.7' - python.architecture: x86 - Python34-x86: - python.version: '3.4' - python.architecture: x86 - Python35-x86: - python.version: '3.5' - python.architecture: x86 - Python36-x86: - python.version: '3.6' - python.architecture: x86 - Python37-x86: - python.version: '3.7' - python.architecture: x86 maxParallel: 5 steps: - - ${{ if eq(parameters.vmImage, 'vs2017-win2017') }}: - - template: ../steps/run-tests-windows.yml - parameters: - runIntegrationTests: false + - task: UsePythonVersion@0 + displayName: Use Python $(python.version) + inputs: + versionSpec: '$(python.version)' + + - template: install-dependencies.yml + + - script: tox -e py -- -m unit --junit-xml=junit/unit-test.xml + displayName: Tox run unit tests + + # Run integration tests in two groups so we will fail faster if there is a failure in the first group + - script: tox -e py -- -m integration -n 4 --duration=5 -k "not test_install" --junit-xml=junit/integration-test-group0.xml + displayName: Tox run Group 0 integration tests + + - script: tox -e py -- -m integration -n 4 --duration=5 -k "test_install" --junit-xml=junit/integration-test-group1.xml + displayName: Tox run Group 1 integration tests - - ${{ if ne(parameters.vmImage, 'vs2017-win2017') }}: - - template: ../steps/run-tests.yml + - task: PublishTestResults@2 + displayName: Publish Test Results + inputs: + testResultsFiles: junit/*.xml + testRunTitle: 'Python $(python.version)' + condition: succeededOrFailed() diff --git a/.azure-pipelines/steps/install-dependencies.yml b/.azure-pipelines/steps/install-dependencies.yml index 8946a5568d2..22c15e9c9d2 100644 --- a/.azure-pipelines/steps/install-dependencies.yml +++ b/.azure-pipelines/steps/install-dependencies.yml @@ -1,3 +1,3 @@ steps: - bash: pip install --upgrade setuptools tox - displayName: Install dependencies \ No newline at end of file + displayName: Install Tox \ No newline at end of file diff --git a/.azure-pipelines/steps/run-tests.yml b/.azure-pipelines/steps/run-tests.yml deleted file mode 100644 index 588445b9942..00000000000 --- a/.azure-pipelines/steps/run-tests.yml +++ /dev/null @@ -1,24 +0,0 @@ -steps: -- task: UsePythonVersion@0 - displayName: Use Python $(python.version) - inputs: - versionSpec: '$(python.version)' - -- template: install-dependencies.yml - -- script: tox -e py -- -m unit --junit-xml=junit/unit-test.xml - displayName: Tox run unit tests - -# Run integration tests in two groups so we will fail faster if there is a failure in the first group -- script: tox -e py -- -m integration -n 4 --duration=5 -k "not test_install" --junit-xml=junit/integration-test-group0.xml - displayName: Tox run Group 0 integration tests - -- script: tox -e py -- -m integration -n 4 --duration=5 -k "test_install" --junit-xml=junit/integration-test-group1.xml - displayName: Tox run Group 1 integration tests - -- task: PublishTestResults@2 - displayName: Publish Test Results - inputs: - testResultsFiles: junit/*.xml - testRunTitle: 'Python $(python.version)' - condition: succeededOrFailed() \ No newline at end of file From 55f15beb26be6f480d2c9e85bf0ba0ae5dd85c46 Mon Sep 17 00:00:00 2001 From: Brian Cristante Date: Mon, 1 Oct 2018 12:27:35 +0000 Subject: [PATCH 09/19] Merged PR 24: Configure pipelines for canary builds --- .azure-pipelines/jobs/test-windows.yml | 65 ++++++++++++++++ .azure-pipelines/jobs/test.yml | 75 +++++++------------ .azure-pipelines/linux-preview.yml | 8 ++ .azure-pipelines/macos-preview.yml | 8 ++ .azure-pipelines/macos.yml | 4 +- .../steps/install-dependencies.yml | 2 +- .azure-pipelines/steps/run-tests.yml | 24 ------ .../{linux.yml => ubuntu-16.04.yml} | 0 .azure-pipelines/{windows.yml => vs2017.yml} | 0 9 files changed, 111 insertions(+), 75 deletions(-) create mode 100644 .azure-pipelines/jobs/test-windows.yml create mode 100644 .azure-pipelines/linux-preview.yml create mode 100644 .azure-pipelines/macos-preview.yml delete mode 100644 .azure-pipelines/steps/run-tests.yml rename .azure-pipelines/{linux.yml => ubuntu-16.04.yml} (100%) rename .azure-pipelines/{windows.yml => vs2017.yml} (100%) diff --git a/.azure-pipelines/jobs/test-windows.yml b/.azure-pipelines/jobs/test-windows.yml new file mode 100644 index 00000000000..52c782daed5 --- /dev/null +++ b/.azure-pipelines/jobs/test-windows.yml @@ -0,0 +1,65 @@ +parameters: + vmImage: + +jobs: +- job: Test_Primary + displayName: Test Primary + + pool: + vmImage: ${{ parameters.vmImage }} + strategy: + matrix: + Python27: + python.version: '2.7' + python.architecture: x64 + Python36: + python.version: '3.6' + python.architecture: x64 + maxParallel: 2 + + steps: + - template: ../steps/run-tests-windows.yml + parameters: + runIntegrationTests: true + +- job: Test_Secondary + displayName: Test Secondary + # Don't run integration tests for these runs + # Run after Test_Primary so we don't devour time and jobs if tests are going to fail + dependsOn: Test_Primary + + pool: + vmImage: ${{ parameters.vmImage }} + strategy: + matrix: + Python34: + python.version: '3.4' + python.architecture: x64 + Python35: + python.version: '3.5' + python.architecture: x64 + Python37: + python.version: '3.7' + python.architecture: x64 + # This is for Windows, so test x86 builds + Python27-x86: + python.version: '2.7' + python.architecture: x86 + Python34-x86: + python.version: '3.4' + python.architecture: x86 + Python35-x86: + python.version: '3.5' + python.architecture: x86 + Python36-x86: + python.version: '3.6' + python.architecture: x86 + Python37-x86: + python.version: '3.7' + python.architecture: x86 + maxParallel: 5 + + steps: + - template: ../steps/run-tests-windows.yml + parameters: + runIntegrationTests: false diff --git a/.azure-pipelines/jobs/test.yml b/.azure-pipelines/jobs/test.yml index 47a286c0e7a..8bd2192bb4e 100644 --- a/.azure-pipelines/jobs/test.yml +++ b/.azure-pipelines/jobs/test.yml @@ -2,8 +2,8 @@ parameters: vmImage: jobs: -- job: Test_Primary - displayName: Test Primary +- job: Test + displayName: Test pool: vmImage: ${{ parameters.vmImage }} @@ -12,62 +12,41 @@ jobs: Python27: python.version: '2.7' python.architecture: x64 - Python36: - python.version: '3.6' - python.architecture: x64 - maxParallel: 2 - - steps: - - ${{ if eq(parameters.vmImage, 'vs2017-win2017') }}: - - template: ../steps/run-tests-windows.yml - parameters: - runIntegrationTests: true - - - ${{ if ne(parameters.vmImage, 'vs2017-win2017') }}: - - template: ../steps/run-tests.yml - -- job: Test_Secondary - displayName: Test Secondary - # Run after Test_Primary so we don't devour time and jobs if tests are going to fail - dependsOn: Test_Primary - - pool: - vmImage: ${{ parameters.vmImage }} - strategy: - matrix: Python34: python.version: '3.4' python.architecture: x64 Python35: python.version: '3.5' python.architecture: x64 + Python36: + python.version: '3.6' + python.architecture: x64 Python37: python.version: '3.7' python.architecture: x64 - # On Windows, test x86 builds - ${{ if eq(parameters.vmImage, 'vs2017-win2017') }}: - Python27-x86: - python.version: '2.7' - python.architecture: x86 - Python34-x86: - python.version: '3.4' - python.architecture: x86 - Python35-x86: - python.version: '3.5' - python.architecture: x86 - Python36-x86: - python.version: '3.6' - python.architecture: x86 - Python37-x86: - python.version: '3.7' - python.architecture: x86 maxParallel: 5 steps: - - ${{ if eq(parameters.vmImage, 'vs2017-win2017') }}: - - template: ../steps/run-tests-windows.yml - parameters: - runIntegrationTests: false + - task: UsePythonVersion@0 + displayName: Use Python $(python.version) + inputs: + versionSpec: '$(python.version)' + + - template: install-dependencies.yml + + - script: tox -e py -- -m unit --junit-xml=junit/unit-test.xml + displayName: Tox run unit tests + + # Run integration tests in two groups so we will fail faster if there is a failure in the first group + - script: tox -e py -- -m integration -n 4 --duration=5 -k "not test_install" --junit-xml=junit/integration-test-group0.xml + displayName: Tox run Group 0 integration tests + + - script: tox -e py -- -m integration -n 4 --duration=5 -k "test_install" --junit-xml=junit/integration-test-group1.xml + displayName: Tox run Group 1 integration tests - - ${{ if ne(parameters.vmImage, 'vs2017-win2017') }}: - - template: ../steps/run-tests.yml + - task: PublishTestResults@2 + displayName: Publish Test Results + inputs: + testResultsFiles: junit/*.xml + testRunTitle: 'Python $(python.version)' + condition: succeededOrFailed() diff --git a/.azure-pipelines/linux-preview.yml b/.azure-pipelines/linux-preview.yml new file mode 100644 index 00000000000..d7749b95bb6 --- /dev/null +++ b/.azure-pipelines/linux-preview.yml @@ -0,0 +1,8 @@ +jobs: +- template: jobs/test.yml + parameters: + vmImage: Hosted Linux Preview + +- template: jobs/package.yml + parameters: + vmImage: Hosted Linux Preview diff --git a/.azure-pipelines/macos-preview.yml b/.azure-pipelines/macos-preview.yml new file mode 100644 index 00000000000..d0162d2659b --- /dev/null +++ b/.azure-pipelines/macos-preview.yml @@ -0,0 +1,8 @@ +jobs: +- template: jobs/test.yml + parameters: + vmImage: Hosted macOS Preview + +- template: jobs/package.yml + parameters: + vmImage: Hosted macOS Preview diff --git a/.azure-pipelines/macos.yml b/.azure-pipelines/macos.yml index 7408a38840f..90627172f0c 100644 --- a/.azure-pipelines/macos.yml +++ b/.azure-pipelines/macos.yml @@ -1,8 +1,8 @@ jobs: - template: jobs/test.yml parameters: - vmImage: xcode9-macos10.13 + vmImage: Hosted Mac Internal - template: jobs/package.yml parameters: - vmImage: xcode9-macos10.13 + vmImage: Hosted Mac Internal diff --git a/.azure-pipelines/steps/install-dependencies.yml b/.azure-pipelines/steps/install-dependencies.yml index 8946a5568d2..22c15e9c9d2 100644 --- a/.azure-pipelines/steps/install-dependencies.yml +++ b/.azure-pipelines/steps/install-dependencies.yml @@ -1,3 +1,3 @@ steps: - bash: pip install --upgrade setuptools tox - displayName: Install dependencies \ No newline at end of file + displayName: Install Tox \ No newline at end of file diff --git a/.azure-pipelines/steps/run-tests.yml b/.azure-pipelines/steps/run-tests.yml deleted file mode 100644 index 588445b9942..00000000000 --- a/.azure-pipelines/steps/run-tests.yml +++ /dev/null @@ -1,24 +0,0 @@ -steps: -- task: UsePythonVersion@0 - displayName: Use Python $(python.version) - inputs: - versionSpec: '$(python.version)' - -- template: install-dependencies.yml - -- script: tox -e py -- -m unit --junit-xml=junit/unit-test.xml - displayName: Tox run unit tests - -# Run integration tests in two groups so we will fail faster if there is a failure in the first group -- script: tox -e py -- -m integration -n 4 --duration=5 -k "not test_install" --junit-xml=junit/integration-test-group0.xml - displayName: Tox run Group 0 integration tests - -- script: tox -e py -- -m integration -n 4 --duration=5 -k "test_install" --junit-xml=junit/integration-test-group1.xml - displayName: Tox run Group 1 integration tests - -- task: PublishTestResults@2 - displayName: Publish Test Results - inputs: - testResultsFiles: junit/*.xml - testRunTitle: 'Python $(python.version)' - condition: succeededOrFailed() \ No newline at end of file diff --git a/.azure-pipelines/linux.yml b/.azure-pipelines/ubuntu-16.04.yml similarity index 100% rename from .azure-pipelines/linux.yml rename to .azure-pipelines/ubuntu-16.04.yml diff --git a/.azure-pipelines/windows.yml b/.azure-pipelines/vs2017.yml similarity index 100% rename from .azure-pipelines/windows.yml rename to .azure-pipelines/vs2017.yml From 69c74f916e7e588a0c314fc7a768e83a5a6f0aec Mon Sep 17 00:00:00 2001 From: Brian Cristante Date: Mon, 1 Oct 2018 08:29:19 -0400 Subject: [PATCH 10/19] delete install-dependencies.yml and fix build --- .azure-pipelines/jobs/test.yml | 3 ++- .azure-pipelines/steps/install-dependencies.yml | 3 --- .azure-pipelines/steps/run-tests-windows.yml | 3 ++- 3 files changed, 4 insertions(+), 5 deletions(-) delete mode 100644 .azure-pipelines/steps/install-dependencies.yml diff --git a/.azure-pipelines/jobs/test.yml b/.azure-pipelines/jobs/test.yml index 8bd2192bb4e..bb113a3b5d4 100644 --- a/.azure-pipelines/jobs/test.yml +++ b/.azure-pipelines/jobs/test.yml @@ -32,7 +32,8 @@ jobs: inputs: versionSpec: '$(python.version)' - - template: install-dependencies.yml + - bash: pip install --upgrade setuptools tox + displayName: Install Tox - script: tox -e py -- -m unit --junit-xml=junit/unit-test.xml displayName: Tox run unit tests diff --git a/.azure-pipelines/steps/install-dependencies.yml b/.azure-pipelines/steps/install-dependencies.yml deleted file mode 100644 index 22c15e9c9d2..00000000000 --- a/.azure-pipelines/steps/install-dependencies.yml +++ /dev/null @@ -1,3 +0,0 @@ -steps: -- bash: pip install --upgrade setuptools tox - displayName: Install Tox \ No newline at end of file diff --git a/.azure-pipelines/steps/run-tests-windows.yml b/.azure-pipelines/steps/run-tests-windows.yml index f01edbe3428..6ce5d1cc010 100644 --- a/.azure-pipelines/steps/run-tests-windows.yml +++ b/.azure-pipelines/steps/run-tests-windows.yml @@ -8,7 +8,8 @@ steps: versionSpec: '$(python.version)' architecture: '$(python.architecture)' -- template: install-dependencies.yml +- bash: pip install --upgrade setuptools tox + displayName: Install Tox - script: tox -e py -- -m unit -n 3 --junit-xml=junit/unit-test.xml displayName: Tox run unit tests From 3f6f28d0bd189662ca3813c932f9a3ffb3b1d0a2 Mon Sep 17 00:00:00 2001 From: Brian Cristante Date: Mon, 1 Oct 2018 08:39:39 -0400 Subject: [PATCH 11/19] Fix job reference --- .azure-pipelines/jobs/package.yml | 3 +-- .azure-pipelines/jobs/test-windows.yml | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.azure-pipelines/jobs/package.yml b/.azure-pipelines/jobs/package.yml index f8e9d7abd06..7bebbb5d4b6 100644 --- a/.azure-pipelines/jobs/package.yml +++ b/.azure-pipelines/jobs/package.yml @@ -4,8 +4,7 @@ parameters: jobs: - job: Package dependsOn: - - Test_Primary - - Test_Secondary + - Test pool: vmImage: ${{ parameters.vmImage }} diff --git a/.azure-pipelines/jobs/test-windows.yml b/.azure-pipelines/jobs/test-windows.yml index 52c782daed5..74f4df921e4 100644 --- a/.azure-pipelines/jobs/test-windows.yml +++ b/.azure-pipelines/jobs/test-windows.yml @@ -2,7 +2,7 @@ parameters: vmImage: jobs: -- job: Test_Primary +- job: Test displayName: Test Primary pool: @@ -26,7 +26,7 @@ jobs: displayName: Test Secondary # Don't run integration tests for these runs # Run after Test_Primary so we don't devour time and jobs if tests are going to fail - dependsOn: Test_Primary + dependsOn: Test pool: vmImage: ${{ parameters.vmImage }} From 3f7af32c243bff8a6b6b3ca9332feb0b584b117e Mon Sep 17 00:00:00 2001 From: Brian Cristante Date: Mon, 1 Oct 2018 08:55:56 -0400 Subject: [PATCH 12/19] switch vs2017.yml to use the run-tests-windows.yml --- .azure-pipelines/vs2017.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azure-pipelines/vs2017.yml b/.azure-pipelines/vs2017.yml index 21f30748428..9322def5603 100644 --- a/.azure-pipelines/vs2017.yml +++ b/.azure-pipelines/vs2017.yml @@ -1,5 +1,5 @@ jobs: -- template: jobs/test.yml +- template: jobs/run-tests-windows.yml parameters: vmImage: vs2017-win2017 From 012d76b847eabfcc1ddfd0b6a144d0d3b763c2d5 Mon Sep 17 00:00:00 2001 From: Brian Cristante Date: Mon, 1 Oct 2018 08:56:56 -0400 Subject: [PATCH 13/19] switch vs2017.yml to use test-windows.yml --- .azure-pipelines/vs2017.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azure-pipelines/vs2017.yml b/.azure-pipelines/vs2017.yml index 9322def5603..bdd4d30154e 100644 --- a/.azure-pipelines/vs2017.yml +++ b/.azure-pipelines/vs2017.yml @@ -1,5 +1,5 @@ jobs: -- template: jobs/run-tests-windows.yml +- template: jobs/test-windows.yml parameters: vmImage: vs2017-win2017 From 767eafc98141a81f2277ed010dcebf3f57a1484d Mon Sep 17 00:00:00 2001 From: Brian Cristante Date: Fri, 5 Oct 2018 13:54:29 -0400 Subject: [PATCH 14/19] Pass pool instead of vmImage --- .azure-pipelines/jobs/package.yml | 5 ++--- .azure-pipelines/jobs/test-windows.yml | 8 +++----- .azure-pipelines/jobs/test.yml | 5 ++--- .azure-pipelines/linux-preview.yml | 4 ++-- .azure-pipelines/macos-preview.yml | 4 ++-- .azure-pipelines/macos.yml | 4 ++-- .azure-pipelines/ubuntu-16.04.yml | 4 ++-- .azure-pipelines/vs2017.yml | 4 ++-- 8 files changed, 17 insertions(+), 21 deletions(-) diff --git a/.azure-pipelines/jobs/package.yml b/.azure-pipelines/jobs/package.yml index 7bebbb5d4b6..9b64ad1b8fc 100644 --- a/.azure-pipelines/jobs/package.yml +++ b/.azure-pipelines/jobs/package.yml @@ -1,12 +1,11 @@ parameters: - vmImage: + pool: jobs: - job: Package dependsOn: - Test - pool: - vmImage: ${{ parameters.vmImage }} + pool: ${{ parameters.pool }} steps: - task: UsePythonVersion@0 diff --git a/.azure-pipelines/jobs/test-windows.yml b/.azure-pipelines/jobs/test-windows.yml index 74f4df921e4..0dc32276804 100644 --- a/.azure-pipelines/jobs/test-windows.yml +++ b/.azure-pipelines/jobs/test-windows.yml @@ -1,12 +1,11 @@ parameters: - vmImage: + pool: jobs: - job: Test displayName: Test Primary - pool: - vmImage: ${{ parameters.vmImage }} + pool: ${{ parameters.pool }} strategy: matrix: Python27: @@ -28,8 +27,7 @@ jobs: # Run after Test_Primary so we don't devour time and jobs if tests are going to fail dependsOn: Test - pool: - vmImage: ${{ parameters.vmImage }} + pool: ${{ parameters.pool }} strategy: matrix: Python34: diff --git a/.azure-pipelines/jobs/test.yml b/.azure-pipelines/jobs/test.yml index bb113a3b5d4..a0151989c0b 100644 --- a/.azure-pipelines/jobs/test.yml +++ b/.azure-pipelines/jobs/test.yml @@ -1,12 +1,11 @@ parameters: - vmImage: + pool: jobs: - job: Test displayName: Test - pool: - vmImage: ${{ parameters.vmImage }} + pool: ${{ parameters.pool }} strategy: matrix: Python27: diff --git a/.azure-pipelines/linux-preview.yml b/.azure-pipelines/linux-preview.yml index d7749b95bb6..d206dd972cd 100644 --- a/.azure-pipelines/linux-preview.yml +++ b/.azure-pipelines/linux-preview.yml @@ -1,8 +1,8 @@ jobs: - template: jobs/test.yml parameters: - vmImage: Hosted Linux Preview + pool: Hosted Linux Preview - template: jobs/package.yml parameters: - vmImage: Hosted Linux Preview + pool: Hosted Linux Preview diff --git a/.azure-pipelines/macos-preview.yml b/.azure-pipelines/macos-preview.yml index d0162d2659b..b0b429adb1b 100644 --- a/.azure-pipelines/macos-preview.yml +++ b/.azure-pipelines/macos-preview.yml @@ -1,8 +1,8 @@ jobs: - template: jobs/test.yml parameters: - vmImage: Hosted macOS Preview + pool: Hosted macOS Preview - template: jobs/package.yml parameters: - vmImage: Hosted macOS Preview + pool: Hosted macOS Preview diff --git a/.azure-pipelines/macos.yml b/.azure-pipelines/macos.yml index 90627172f0c..c89e7d33050 100644 --- a/.azure-pipelines/macos.yml +++ b/.azure-pipelines/macos.yml @@ -1,8 +1,8 @@ jobs: - template: jobs/test.yml parameters: - vmImage: Hosted Mac Internal + pool: Hosted Mac Internal - template: jobs/package.yml parameters: - vmImage: Hosted Mac Internal + pool: Hosted Mac Internal diff --git a/.azure-pipelines/ubuntu-16.04.yml b/.azure-pipelines/ubuntu-16.04.yml index 6965a15fc6d..347919ac397 100644 --- a/.azure-pipelines/ubuntu-16.04.yml +++ b/.azure-pipelines/ubuntu-16.04.yml @@ -1,8 +1,8 @@ jobs: - template: jobs/test.yml parameters: - vmImage: ubuntu-16.04 + pool: { vmImage: ubuntu-16.04 } - template: jobs/package.yml parameters: - vmImage: ubuntu-16.04 + pool: { vmImage: ubuntu-16.04 } diff --git a/.azure-pipelines/vs2017.yml b/.azure-pipelines/vs2017.yml index bdd4d30154e..c1a71a4e164 100644 --- a/.azure-pipelines/vs2017.yml +++ b/.azure-pipelines/vs2017.yml @@ -1,8 +1,8 @@ jobs: - template: jobs/test-windows.yml parameters: - vmImage: vs2017-win2017 + pool: { vmImage: vs2017-win2017 } - template: jobs/package.yml parameters: - vmImage: vs2017-win2017 + pool: { vmImage: vs2017-win2017 } From 35b1ea333ee95e78758928bfea61ad289343be1b Mon Sep 17 00:00:00 2001 From: Brian Cristante Date: Fri, 5 Oct 2018 13:58:49 -0400 Subject: [PATCH 15/19] fix wrong vmImage name --- .azure-pipelines/vs2017.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.azure-pipelines/vs2017.yml b/.azure-pipelines/vs2017.yml index c1a71a4e164..2a4574701bb 100644 --- a/.azure-pipelines/vs2017.yml +++ b/.azure-pipelines/vs2017.yml @@ -1,8 +1,8 @@ jobs: - template: jobs/test-windows.yml parameters: - pool: { vmImage: vs2017-win2017 } + pool: { vmImage: vs2017-win2016 } - template: jobs/package.yml parameters: - pool: { vmImage: vs2017-win2017 } + pool: { vmImage: vs2017-win2016 } From a4d1569c0ebd63b301728fefc2838735288ce8a4 Mon Sep 17 00:00:00 2001 From: Brian Cristante Date: Fri, 5 Oct 2018 14:01:46 -0400 Subject: [PATCH 16/19] react to name change for vs2017-win2016 image --- .azure-pipelines/windows.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.azure-pipelines/windows.yml b/.azure-pipelines/windows.yml index 21f30748428..2923d0fd14f 100644 --- a/.azure-pipelines/windows.yml +++ b/.azure-pipelines/windows.yml @@ -1,8 +1,8 @@ jobs: - template: jobs/test.yml parameters: - vmImage: vs2017-win2017 + vmImage: vs2017-win2016 - template: jobs/package.yml parameters: - vmImage: vs2017-win2017 + vmImage: vs2017-win2016 From 1b67afe99cc2c0f41e1181d57014d37d57bc0337 Mon Sep 17 00:00:00 2001 From: Brian Cristante Date: Fri, 5 Oct 2018 16:01:08 -0400 Subject: [PATCH 17/19] just install tox explicitly --- .azure-pipelines/steps/run-tests.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.azure-pipelines/steps/run-tests.yml b/.azure-pipelines/steps/run-tests.yml index 588445b9942..95e7b388f67 100644 --- a/.azure-pipelines/steps/run-tests.yml +++ b/.azure-pipelines/steps/run-tests.yml @@ -4,7 +4,8 @@ steps: inputs: versionSpec: '$(python.version)' -- template: install-dependencies.yml +- bash: pip install --upgrade setuptools tox + displayName: Install Tox - script: tox -e py -- -m unit --junit-xml=junit/unit-test.xml displayName: Tox run unit tests From a85f4213322cb2bc67eb2690cb0fd307a06f591e Mon Sep 17 00:00:00 2001 From: Brian Cristante Date: Fri, 5 Oct 2018 16:45:15 -0400 Subject: [PATCH 18/19] need to run test-windows job from windows.yml --- .azure-pipelines/jobs/test-windows.yml | 2 +- .azure-pipelines/windows.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.azure-pipelines/jobs/test-windows.yml b/.azure-pipelines/jobs/test-windows.yml index 861c4da1ab7..49807a2eb22 100644 --- a/.azure-pipelines/jobs/test-windows.yml +++ b/.azure-pipelines/jobs/test-windows.yml @@ -2,7 +2,7 @@ parameters: vmImage: jobs: -- job: Test +- job: Test_Primary displayName: Test Primary pool: diff --git a/.azure-pipelines/windows.yml b/.azure-pipelines/windows.yml index 2923d0fd14f..9d1bf5385d0 100644 --- a/.azure-pipelines/windows.yml +++ b/.azure-pipelines/windows.yml @@ -1,5 +1,5 @@ jobs: -- template: jobs/test.yml +- template: jobs/test-windows.yml parameters: vmImage: vs2017-win2016 From f454f609be1b63a1da9b41bf42ed53fb87dfd5be Mon Sep 17 00:00:00 2001 From: Brian Cristante Date: Fri, 5 Oct 2018 16:49:01 -0400 Subject: [PATCH 19/19] fix dependsOn --- .azure-pipelines/jobs/test-windows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azure-pipelines/jobs/test-windows.yml b/.azure-pipelines/jobs/test-windows.yml index 49807a2eb22..b8cb6044f11 100644 --- a/.azure-pipelines/jobs/test-windows.yml +++ b/.azure-pipelines/jobs/test-windows.yml @@ -26,7 +26,7 @@ jobs: displayName: Test Secondary # Don't run integration tests for these runs # Run after Test_Primary so we don't devour time and jobs if tests are going to fail - dependsOn: Test + dependsOn: Test_Primary pool: vmImage: ${{ parameters.vmImage }}