summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.azure-pipelines/jobs/package.yml37
-rw-r--r--.azure-pipelines/jobs/test-windows.yml65
-rw-r--r--.azure-pipelines/jobs/test.yml44
-rw-r--r--.azure-pipelines/linux.yml8
-rw-r--r--.azure-pipelines/macos.yml8
-rw-r--r--.azure-pipelines/steps/run-tests-windows.yml38
-rw-r--r--.azure-pipelines/steps/run-tests.yml25
-rw-r--r--.azure-pipelines/windows.yml8
-rw-r--r--MANIFEST.in1
-rw-r--r--README.rst9
-rw-r--r--tasks/generate.py4
11 files changed, 246 insertions, 1 deletions
diff --git a/.azure-pipelines/jobs/package.yml b/.azure-pipelines/jobs/package.yml
new file mode 100644
index 000000000..f8e9d7abd
--- /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-windows.yml b/.azure-pipelines/jobs/test-windows.yml
new file mode 100644
index 000000000..b8cb6044f
--- /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-x64:
+ python.version: '2.7'
+ python.architecture: x64
+ Python36-x64:
+ 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-x64:
+ python.version: '3.4'
+ python.architecture: x64
+ Python35-x64:
+ python.version: '3.5'
+ python.architecture: x64
+ Python37-x64:
+ 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
new file mode 100644
index 000000000..7c51a26fc
--- /dev/null
+++ b/.azure-pipelines/jobs/test.yml
@@ -0,0 +1,44 @@
+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.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
+ maxParallel: 3
+
+ steps:
+ - template: ../steps/run-tests.yml
diff --git a/.azure-pipelines/linux.yml b/.azure-pipelines/linux.yml
new file mode 100644
index 000000000..6965a15fc
--- /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 000000000..7408a3884
--- /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/run-tests-windows.yml b/.azure-pipelines/steps/run-tests-windows.yml
new file mode 100644
index 000000000..6ce5d1cc0
--- /dev/null
+++ b/.azure-pipelines/steps/run-tests-windows.yml
@@ -0,0 +1,38 @@
+parameters:
+ runIntegrationTests:
+
+steps:
+- task: UsePythonVersion@0
+ displayName: Use Python $(python.version)
+ inputs:
+ versionSpec: '$(python.version)'
+ architecture: '$(python.architecture)'
+
+- 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
+
+- ${{ 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 000000000..95e7b388f
--- /dev/null
+++ b/.azure-pipelines/steps/run-tests.yml
@@ -0,0 +1,25 @@
+steps:
+- task: UsePythonVersion@0
+ displayName: Use Python $(python.version)
+ inputs:
+ versionSpec: '$(python.version)'
+
+- 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
+
+# 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 000000000..9d1bf5385
--- /dev/null
+++ b/.azure-pipelines/windows.yml
@@ -0,0 +1,8 @@
+jobs:
+- template: jobs/test-windows.yml
+ parameters:
+ vmImage: vs2017-win2016
+
+- template: jobs/package.yml
+ parameters:
+ vmImage: vs2017-win2016
diff --git a/MANIFEST.in b/MANIFEST.in
index 8841e241d..5b19010e0 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -25,6 +25,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 a7de55fe5..ca629302a 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`_
diff --git a/tasks/generate.py b/tasks/generate.py
index 69960231c..235789707 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)))