From 152bc3866413e38a648207fd8faa14558a46c1cd Mon Sep 17 00:00:00 2001 From: Pradyun Gedam Date: Sat, 11 Apr 2020 18:35:48 +0530 Subject: [PATCH 01/17] GitHub Actions: Significantly rework workflow Add Ubuntu testing, and run all developer tasks --- .github/workflows/ci.yml | 141 ++++++++++++++++++++++++++++++++++ .github/workflows/linting.yml | 54 ------------- 2 files changed, 141 insertions(+), 54 deletions(-) create mode 100644 .github/workflows/ci.yml delete mode 100644 .github/workflows/linting.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000000..80eec627ee7 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,141 @@ +name: CI + +on: + push: + branches: + - master + pull_request: + schedule: + # Run every Friday at 18:02 UTC + - cron: 2 18 * * 5 + +jobs: + dev-tools: + name: Quality Check / ${{ matrix.os }} + runs-on: ${{ matrix.os }}-latest + + strategy: + matrix: + os: [Ubuntu, Windows, MacOS] + + steps: + # Caches + - name: pip cache + uses: actions/cache@v1 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip-${{ hashFiles('tools/requirements/tests.txt') }}-${{ hashFiles('tools/requirements/docs.txt') }}-${{ hashFiles('tox.ini') }} + restore-keys: | + ${{ runner.os }}-pip- + ${{ runner.os }}- + + - name: Set PY (for pre-commit cache) + run: echo "::set-env name=PY::$(python -c 'import hashlib, sys;print(hashlib.sha256(sys.version.encode()+sys.executable.encode()).hexdigest())')" + - name: pre-commit cache + uses: actions/cache@v1 + with: + path: ~/.cache/pre-commit + key: pre-commit|2020-02-14|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }} + + # Setup + - uses: actions/checkout@v2 + - name: Set up Python 3.8 + uses: actions/setup-python@v1 + with: + python-version: 3.8 + + - name: Install tox + run: python -m pip install tox + + # Main check + - run: python -m tox -e "lint,docs" + + packaging: + name: Packaging / ${{ matrix.os }} + runs-on: ${{ matrix.os }}-latest + + strategy: + matrix: + os: [Ubuntu, Windows, MacOS] + + steps: + # Caches + - name: pip cache + uses: actions/cache@v1 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip-${{ hashFiles('tools/requirements/tests.txt') }}-${{ hashFiles('tools/requirements/docs.txt') }}-${{ hashFiles('tox.ini') }} + restore-keys: | + ${{ runner.os }}-pip- + ${{ runner.os }}- + + # Setup + - name: Set up git credentials + run: | + git config --global user.email "pypa-dev@googlegroups.com" + git config --global user.name "pip" + + - uses: actions/checkout@v2 + - name: Set up Python 3.8 + uses: actions/setup-python@v1 + with: + python-version: 3.8 + - name: Install tox and nox + run: python -m pip install tox nox + + # Main check + - name: Check vendored packages + run: python -m tox -e "vendoring" + + - name: Prepare dummy release + run: nox -s prepare-release -- 99.9 + + - name: Generate distributions for the dummy release + run: nox -s build-release -- 99.9 + + tests: + name: Tests / ${{ matrix.python }} / ${{ matrix.os }} + runs-on: ${{ matrix.os }}-latest + + needs: dev-tools + + strategy: + fail-fast: false + matrix: + os: [Ubuntu] + python: [2.7, 3.5, 3.6, 3.7, 3.8] + + steps: + # Caches + - name: pip cache + uses: actions/cache@v1 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip-${{ hashFiles('tools/requirements/tests.txt') }}-${{ hashFiles('tools/requirements/docs.txt') }}-${{ hashFiles('tox.ini') }} + restore-keys: | + ${{ runner.os }}-pip- + ${{ runner.os }}- + + # Setup + - uses: actions/checkout@v2 + - uses: actions/setup-python@v1 + with: + python-version: ${{ matrix.python }} + + - name: Install tox + run: python -m pip install tox 'virtualenv<20' + + # Main check + - name: Run unit tests + run: >- + python -m tox -e py -- + -m unit + --verbose + --numprocesses auto + - name: Run integration tests + run: >- + python -m tox -e py -- + -m integration + --verbose + --numprocesses auto + --duration=5 diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml deleted file mode 100644 index 512969b0dff..00000000000 --- a/.github/workflows/linting.yml +++ /dev/null @@ -1,54 +0,0 @@ -name: Linting - -on: - push: - pull_request: - schedule: - # Run every Friday at 18:02 UTC - - cron: 2 18 * * 5 - -jobs: - lint: - name: ${{ matrix.os }} - runs-on: ${{ matrix.os }}-latest - env: - TOXENV: lint,docs,vendoring - - strategy: - matrix: - os: - - Ubuntu - - Windows - - MacOS - - steps: - - uses: actions/checkout@v2 - - name: Set up Python 3.8 - uses: actions/setup-python@v1 - with: - python-version: 3.8 - - # Setup Caching - - name: pip cache - uses: actions/cache@v1 - with: - path: ~/.cache/pip - key: ${{ runner.os }}-pip-${{ hashFiles('tools/requirements/tests.txt') }}-${{ hashFiles('tools/requirements/docs.txt') }}-${{ hashFiles('tox.ini') }} - restore-keys: | - ${{ runner.os }}-pip- - ${{ runner.os }}- - - - name: Set PY (for pre-commit cache) - run: echo "::set-env name=PY::$(python -c 'import hashlib, sys;print(hashlib.sha256(sys.version.encode()+sys.executable.encode()).hexdigest())')" - - name: pre-commit cache - uses: actions/cache@v1 - with: - path: ~/.cache/pre-commit - key: pre-commit|2020-02-14|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }} - - # Get the latest tox - - name: Install tox - run: python -m pip install tox - - # Main check - - run: python -m tox From 4679e794a49ce3d42fd948facc3044d3920baf79 Mon Sep 17 00:00:00 2001 From: Pradyun Gedam Date: Sat, 11 Apr 2020 18:42:41 +0530 Subject: [PATCH 02/17] docs: Update to reflect GitHub Actions Changes - runs all developer tasks - runs tests on Ubuntu --- docs/html/development/ci.rst | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/docs/html/development/ci.rst b/docs/html/development/ci.rst index dbd80eb6cef..e9c06cb690b 100644 --- a/docs/html/development/ci.rst +++ b/docs/html/development/ci.rst @@ -79,13 +79,13 @@ Current run tests Developer tasks --------------- -======== =============== ================ ================== ============ - OS docs lint vendoring packages -======== =============== ================ ================== ============ -Linux Travis, Github Travis, Github Travis, Github Azure -Windows Azure -MacOS Azure -======== =============== ================ ================== ============ +======== =============== ================ ================== ================= + OS docs lint vendoring packages +======== =============== ================ ================== ================= +Linux Travis, Github Travis, Github Travis, Github Azure, Github +Windows Github Github Github Azure, Github +MacOS Github Github Github Azure, Github +======== =============== ================ ================== ================= Actual testing -------------- @@ -135,15 +135,15 @@ Actual testing | | +-------+---------------+-----------------+ | | | PyPy3 | | | | Linux +----------+-------+---------------+-----------------+ -| | | CP2.7 | Travis,Azure | Travis,Azure | +| | | CP2.7 | Travis,Azure,GitHub | Travis,Azure,GitHub | | | +-------+---------------+-----------------+ -| | | CP3.5 | Travis,Azure | Travis,Azure | +| | | CP3.5 | Travis,Azure,GitHub | Travis,Azure,GitHub | | | +-------+---------------+-----------------+ -| | | CP3.6 | Travis,Azure | Travis,Azure | +| | | CP3.6 | Travis,Azure,GitHub | Travis,Azure,GitHub | | | +-------+---------------+-----------------+ -| | x64 | CP3.7 | Travis,Azure | Travis,Azure | +| | x64 | CP3.7 | Travis,Azure,GitHub | Travis,Azure,GitHub | | | +-------+---------------+-----------------+ -| | | CP3.8 | Travis | Travis | +| | | CP3.8 | Travis,Azure,GitHub | Travis,Azure,GitHub | | | +-------+---------------+-----------------+ | | | PyPy | Travis | Travis | | | +-------+---------------+-----------------+ From b8b8e47b80d2965970e853f9ce5a2e531c0286e3 Mon Sep 17 00:00:00 2001 From: Pradyun Gedam Date: Sat, 11 Apr 2020 18:52:51 +0530 Subject: [PATCH 03/17] Azure Pipelines: Drop OS-specific pipelines --- .azure-pipelines/ci.yml | 10 ++++++++++ .azure-pipelines/linux.yml | 8 -------- .azure-pipelines/macos.yml | 8 -------- .azure-pipelines/windows.yml | 8 -------- 4 files changed, 10 insertions(+), 24 deletions(-) create mode 100644 .azure-pipelines/ci.yml delete mode 100644 .azure-pipelines/linux.yml delete mode 100644 .azure-pipelines/macos.yml delete mode 100644 .azure-pipelines/windows.yml diff --git a/.azure-pipelines/ci.yml b/.azure-pipelines/ci.yml new file mode 100644 index 00000000000..1da50bc0453 --- /dev/null +++ b/.azure-pipelines/ci.yml @@ -0,0 +1,10 @@ +jobs: +- template: jobs/test.yml + parameters: + vmImage: macos-10.14 +- template: jobs/test-windows.yml + parameters: + vmImage: vs2017-win2016 +- template: jobs/test.yml + parameters: + vmImage: ubuntu-16.04 diff --git a/.azure-pipelines/linux.yml b/.azure-pipelines/linux.yml deleted file mode 100644 index 6965a15fc6d..00000000000 --- a/.azure-pipelines/linux.yml +++ /dev/null @@ -1,8 +0,0 @@ -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 deleted file mode 100644 index 85c2a0246af..00000000000 --- a/.azure-pipelines/macos.yml +++ /dev/null @@ -1,8 +0,0 @@ -jobs: -- template: jobs/test.yml - parameters: - vmImage: macos-10.14 - -- template: jobs/package.yml - parameters: - vmImage: macos-10.14 diff --git a/.azure-pipelines/windows.yml b/.azure-pipelines/windows.yml deleted file mode 100644 index 9d1bf5385d0..00000000000 --- a/.azure-pipelines/windows.yml +++ /dev/null @@ -1,8 +0,0 @@ -jobs: -- template: jobs/test-windows.yml - parameters: - vmImage: vs2017-win2016 - -- template: jobs/package.yml - parameters: - vmImage: vs2017-win2016 From 0e0b726cea04601a1a6ac8dafb0828de046092e7 Mon Sep 17 00:00:00 2001 From: Pradyun Gedam Date: Sat, 11 Apr 2020 18:53:43 +0530 Subject: [PATCH 04/17] Azure Pipelines: Drop package.yml --- .azure-pipelines/jobs/package.yml | 36 ------------------------------- 1 file changed, 36 deletions(-) delete mode 100644 .azure-pipelines/jobs/package.yml diff --git a/.azure-pipelines/jobs/package.yml b/.azure-pipelines/jobs/package.yml deleted file mode 100644 index 8663720de9c..00000000000 --- a/.azure-pipelines/jobs/package.yml +++ /dev/null @@ -1,36 +0,0 @@ -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: | - git config --global user.email "pypa-dev@googlegroups.com" - git config --global user.name "pip" - displayName: Setup Git credentials - - - bash: pip install nox - displayName: Install dependencies - - - bash: nox -s prepare-release -- 99.9 - displayName: Prepare dummy release - - - bash: nox -s build-release -- 99.9 - displayName: Generate distributions for the dummy release - - - task: PublishBuildArtifacts@1 - displayName: 'Publish Artifact: dist' - inputs: - pathtoPublish: dist - artifactName: dist From 41a1f9f2a147c3915176f9e1848342e118144ae3 Mon Sep 17 00:00:00 2001 From: Pradyun Gedam Date: Sat, 11 Apr 2020 18:54:07 +0530 Subject: [PATCH 05/17] Azure Pipelines: Improve names --- .azure-pipelines/ci.yml | 4 ++++ .azure-pipelines/jobs/test-windows.yml | 24 ++++++++++++------------ .azure-pipelines/jobs/test.yml | 15 ++++++++------- 3 files changed, 24 insertions(+), 19 deletions(-) diff --git a/.azure-pipelines/ci.yml b/.azure-pipelines/ci.yml index 1da50bc0453..a183c93ac88 100644 --- a/.azure-pipelines/ci.yml +++ b/.azure-pipelines/ci.yml @@ -2,9 +2,13 @@ jobs: - template: jobs/test.yml parameters: vmImage: macos-10.14 + osName: MacOS + - template: jobs/test-windows.yml parameters: vmImage: vs2017-win2016 + - template: jobs/test.yml parameters: vmImage: ubuntu-16.04 + osName: Linux diff --git a/.azure-pipelines/jobs/test-windows.yml b/.azure-pipelines/jobs/test-windows.yml index 1a933a6934b..db7bf30a2cf 100644 --- a/.azure-pipelines/jobs/test-windows.yml +++ b/.azure-pipelines/jobs/test-windows.yml @@ -3,30 +3,30 @@ parameters: jobs: - job: Test_Primary - displayName: Test Primary + displayName: Tests / Windows / pool: vmImage: ${{ parameters.vmImage }} strategy: matrix: - Python27-x86: + "2.7-x86": python.version: '2.7' python.architecture: x86 - Python27-x64: + "2.7": python.version: '2.7' python.architecture: x64 useVenv: true - Python35-x64: + "3.5": python.version: '3.5' python.architecture: x64 - Python36-x64: + "3.6": python.version: '3.6' python.architecture: x64 useVenv: true - Python37-x64: + "3.7": python.version: '3.7' python.architecture: x64 - Python38-x64: + "3.8": python.version: '3.8' python.architecture: x64 maxParallel: 6 @@ -38,7 +38,7 @@ jobs: useVenv: '$(useVenv)' - job: Test_Secondary - displayName: Test Secondary + displayName: Tests / Windows / # 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 @@ -48,16 +48,16 @@ jobs: strategy: matrix: # This is for Windows, so test x86 builds - Python35-x86: + "3.5-x86": python.version: '3.5' python.architecture: x86 - Python36-x86: + "3.6-x86": python.version: '3.6' python.architecture: x86 - Python37-x86: + "3.7-x86": python.version: '3.7' python.architecture: x86 - Python38-x86: + "3.8-x86": python.version: '3.8' python.architecture: x86 maxParallel: 6 diff --git a/.azure-pipelines/jobs/test.yml b/.azure-pipelines/jobs/test.yml index 68b6e5268e1..410ef753a68 100644 --- a/.azure-pipelines/jobs/test.yml +++ b/.azure-pipelines/jobs/test.yml @@ -1,18 +1,19 @@ parameters: vmImage: + osName: jobs: - job: Test_Primary - displayName: Test Primary + displayName: Tests / ${{ parameters.osName }} / pool: vmImage: ${{ parameters.vmImage }} strategy: matrix: - Python27: + "2.7": python.version: '2.7' python.architecture: x64 - Python36: + "3.6": python.version: '3.6' python.architecture: x64 maxParallel: 2 @@ -21,7 +22,7 @@ jobs: - template: ../steps/run-tests.yml - job: Test_Secondary - displayName: Test Secondary + displayName: Tests / ${{ parameters.osName }} / # Run after Test_Primary so we don't devour time and jobs if tests are going to fail dependsOn: Test_Primary @@ -29,13 +30,13 @@ jobs: vmImage: ${{ parameters.vmImage }} strategy: matrix: - Python35: + "3.5": python.version: '3.5' python.architecture: x64 - Python37: + "3.7": python.version: '3.7' python.architecture: x64 - Python38: + "3.8": python.version: '3.8' python.architecture: x64 maxParallel: 4 From 8fe66f13f2d518ca318611cda65c4c9fad9cce5b Mon Sep 17 00:00:00 2001 From: Pradyun Gedam Date: Sat, 11 Apr 2020 19:00:38 +0530 Subject: [PATCH 06/17] Azure Pipelines: Reduce Windows full-test-runs --- .azure-pipelines/jobs/test-windows.yml | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/.azure-pipelines/jobs/test-windows.yml b/.azure-pipelines/jobs/test-windows.yml index db7bf30a2cf..4cf59981471 100644 --- a/.azure-pipelines/jobs/test-windows.yml +++ b/.azure-pipelines/jobs/test-windows.yml @@ -16,16 +16,6 @@ jobs: python.version: '2.7' python.architecture: x64 useVenv: true - "3.5": - python.version: '3.5' - python.architecture: x64 - "3.6": - python.version: '3.6' - python.architecture: x64 - useVenv: true - "3.7": - python.version: '3.7' - python.architecture: x64 "3.8": python.version: '3.8' python.architecture: x64 @@ -47,7 +37,15 @@ jobs: vmImage: ${{ parameters.vmImage }} strategy: matrix: - # This is for Windows, so test x86 builds + "3.5": + python.version: '3.5' + python.architecture: x64 + "3.6": + python.version: '3.6' + python.architecture: x64 + "3.7": + python.version: '3.7' + python.architecture: x64 "3.5-x86": python.version: '3.5' python.architecture: x86 From 48532d47dc5cb73d4a2a4b2a94f732a54a8d1e71 Mon Sep 17 00:00:00 2001 From: Pradyun Gedam Date: Sat, 11 Apr 2020 19:02:18 +0530 Subject: [PATCH 07/17] Azure Pipelines: Drop useVenv This wasn't actually ever used, since the value was always '$(useVenv)'. --- .azure-pipelines/jobs/test-windows.yml | 2 -- .azure-pipelines/steps/run-tests-windows.yml | 6 +----- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/.azure-pipelines/jobs/test-windows.yml b/.azure-pipelines/jobs/test-windows.yml index 4cf59981471..586872f78cf 100644 --- a/.azure-pipelines/jobs/test-windows.yml +++ b/.azure-pipelines/jobs/test-windows.yml @@ -15,7 +15,6 @@ jobs: "2.7": python.version: '2.7' python.architecture: x64 - useVenv: true "3.8": python.version: '3.8' python.architecture: x64 @@ -25,7 +24,6 @@ jobs: - template: ../steps/run-tests-windows.yml parameters: runIntegrationTests: true - useVenv: '$(useVenv)' - job: Test_Secondary displayName: Tests / Windows / diff --git a/.azure-pipelines/steps/run-tests-windows.yml b/.azure-pipelines/steps/run-tests-windows.yml index 3832e46621b..a65136289ab 100644 --- a/.azure-pipelines/steps/run-tests-windows.yml +++ b/.azure-pipelines/steps/run-tests-windows.yml @@ -1,6 +1,5 @@ parameters: runIntegrationTests: - useVenv: false steps: - task: UsePythonVersion@0 @@ -44,11 +43,8 @@ steps: # https://bugs.python.org/issue18199 $env:TEMP = "R:\Temp" - tox -e py -- $env:USE_VENV_ARG -m integration -n auto --duration=5 --junit-xml=junit/integration-test.xml + tox -e py -- -m integration -n auto --duration=5 --junit-xml=junit/integration-test.xml displayName: Tox run integration tests - env: - ${{ if eq(parameters.useVenv, 'true') }}: - USE_VENV_ARG: "--use-venv" - task: PublishTestResults@2 displayName: Publish Test Results From c152df0dbad26c64e2461795906297df5f0e3a96 Mon Sep 17 00:00:00 2001 From: Pradyun Gedam Date: Sat, 11 Apr 2020 19:03:47 +0530 Subject: [PATCH 08/17] Azure Pipelines: Drop Linux It's running on other platforms already! --- .azure-pipelines/ci.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.azure-pipelines/ci.yml b/.azure-pipelines/ci.yml index a183c93ac88..2eaa69afb2c 100644 --- a/.azure-pipelines/ci.yml +++ b/.azure-pipelines/ci.yml @@ -7,8 +7,3 @@ jobs: - template: jobs/test-windows.yml parameters: vmImage: vs2017-win2016 - -- template: jobs/test.yml - parameters: - vmImage: ubuntu-16.04 - osName: Linux From 00507cc271df661d43f8cd88b2e7b69d25a696a2 Mon Sep 17 00:00:00 2001 From: Pradyun Gedam Date: Sat, 11 Apr 2020 19:06:52 +0530 Subject: [PATCH 09/17] Azure Pipelines: Split Windows tests into 2 runs --- .azure-pipelines/jobs/test-windows.yml | 42 +++++++++++++++----- .azure-pipelines/steps/run-tests-windows.yml | 31 ++++++++++----- 2 files changed, 54 insertions(+), 19 deletions(-) diff --git a/.azure-pipelines/jobs/test-windows.yml b/.azure-pipelines/jobs/test-windows.yml index 586872f78cf..54b0726fc24 100644 --- a/.azure-pipelines/jobs/test-windows.yml +++ b/.azure-pipelines/jobs/test-windows.yml @@ -2,34 +2,57 @@ parameters: vmImage: jobs: -- job: Test_Primary +- job: Test_Primary_one displayName: Tests / Windows / pool: vmImage: ${{ parameters.vmImage }} strategy: matrix: - "2.7-x86": + "2.7-x86 / 1": python.version: '2.7' python.architecture: x86 - "2.7": + "2.7 / 1": python.version: '2.7' python.architecture: x64 - "3.8": + "3.8 / 1": python.version: '3.8' python.architecture: x64 - maxParallel: 6 steps: - template: ../steps/run-tests-windows.yml parameters: - runIntegrationTests: true + testGroup: one + +- job: Test_Primary_two + displayName: Tests / Windows / + + pool: + vmImage: ${{ parameters.vmImage }} + strategy: + matrix: + "2.7-x86 / 2": + python.version: '2.7' + python.architecture: x86 + "2.7 / 2": + python.version: '2.7' + python.architecture: x64 + "3.8 / 2": + python.version: '3.8' + python.architecture: x64 + + steps: + - template: ../steps/run-tests-windows.yml + parameters: + testGroup: two - job: Test_Secondary displayName: Tests / Windows / # 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 + # Run after Test_Primary_* so we don't devour time and jobs. + dependsOn: + - Test_Primary_one + - Test_Primary_two pool: vmImage: ${{ parameters.vmImage }} @@ -56,9 +79,8 @@ jobs: "3.8-x86": python.version: '3.8' python.architecture: x86 - maxParallel: 6 steps: - template: ../steps/run-tests-windows.yml parameters: - runIntegrationTests: false + testGroup: unit diff --git a/.azure-pipelines/steps/run-tests-windows.yml b/.azure-pipelines/steps/run-tests-windows.yml index a65136289ab..653a1f58f5d 100644 --- a/.azure-pipelines/steps/run-tests-windows.yml +++ b/.azure-pipelines/steps/run-tests-windows.yml @@ -1,5 +1,10 @@ parameters: - runIntegrationTests: +- name: testGroup + type: string + values: + - unit + - one + - two steps: - task: UsePythonVersion@0 @@ -27,15 +32,17 @@ steps: - bash: pip install --upgrade 'virtualenv<20' setuptools tox displayName: Install Tox -- script: tox -e py -- -m unit -n auto --junit-xml=junit/unit-test.xml - env: - TEMP: "R:\\Temp" - displayName: Tox run unit tests +# Lots of fun logic, for... running the correct tests. +- ${{ if in(parameters.testGroup, 'unit', 'one') }}: + - script: tox -e py -- -m unit -n auto --junit-xml=junit/unit-test.xml + env: + TEMP: "R:\\Temp" + displayName: Run unit tests -- ${{ if eq(parameters.runIntegrationTests, 'true') }}: +- ${{ if in(parameters.testGroup, 'one', 'two') }}: - powershell: | # Fix Git SSL errors - pip install certifi tox + pip install certifi python -m certifi > cacert.txt $env:GIT_SSL_CAINFO = $(Get-Content cacert.txt) @@ -43,8 +50,14 @@ steps: # https://bugs.python.org/issue18199 $env:TEMP = "R:\Temp" - tox -e py -- -m integration -n auto --duration=5 --junit-xml=junit/integration-test.xml - displayName: Tox run integration tests + pip install tox + tox -e py -- -k $env:SELECTOR -m integration -n auto --duration=5 --junit-xml=junit/integration-test.xml + env: + ${{ if eq(parameters.testGroup, 'one') }}: + SELECTOR: "not test_install" + ${{ if eq(parameters.testGroup, 'two') }}: + SELECTOR: "test_install" + displayName: Run integration tests - task: PublishTestResults@2 displayName: Publish Test Results From dad20b1d444616d67e555cffb827d1f9b3fadb6a Mon Sep 17 00:00:00 2001 From: Pradyun Gedam Date: Sat, 11 Apr 2020 19:08:13 +0530 Subject: [PATCH 10/17] Azure Pipelines: get OS name from ci.yml for consistency --- .azure-pipelines/ci.yml | 1 + .azure-pipelines/jobs/test-windows.yml | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.azure-pipelines/ci.yml b/.azure-pipelines/ci.yml index 2eaa69afb2c..aafb646638c 100644 --- a/.azure-pipelines/ci.yml +++ b/.azure-pipelines/ci.yml @@ -7,3 +7,4 @@ jobs: - template: jobs/test-windows.yml parameters: vmImage: vs2017-win2016 + osName: Windows diff --git a/.azure-pipelines/jobs/test-windows.yml b/.azure-pipelines/jobs/test-windows.yml index 54b0726fc24..befc2bc27fd 100644 --- a/.azure-pipelines/jobs/test-windows.yml +++ b/.azure-pipelines/jobs/test-windows.yml @@ -1,9 +1,10 @@ parameters: vmImage: + osName: jobs: - job: Test_Primary_one - displayName: Tests / Windows / + displayName: Tests / ${{ parameters.osName }} / pool: vmImage: ${{ parameters.vmImage }} @@ -25,7 +26,7 @@ jobs: testGroup: one - job: Test_Primary_two - displayName: Tests / Windows / + displayName: Tests / ${{ parameters.osName }} / pool: vmImage: ${{ parameters.vmImage }} @@ -47,7 +48,7 @@ jobs: testGroup: two - job: Test_Secondary - displayName: Tests / Windows / + displayName: Tests / ${{ parameters.osName }} / # Don't run integration tests for these runs # Run after Test_Primary_* so we don't devour time and jobs. dependsOn: From 854376f36838577e003217c5bc0336ff6c86e4f6 Mon Sep 17 00:00:00 2001 From: Pradyun Gedam Date: Sat, 11 Apr 2020 19:11:45 +0530 Subject: [PATCH 11/17] Azure Pipelines: Drop maxParallel --- .azure-pipelines/jobs/test.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.azure-pipelines/jobs/test.yml b/.azure-pipelines/jobs/test.yml index 410ef753a68..2712f0cb26f 100644 --- a/.azure-pipelines/jobs/test.yml +++ b/.azure-pipelines/jobs/test.yml @@ -16,7 +16,6 @@ jobs: "3.6": python.version: '3.6' python.architecture: x64 - maxParallel: 2 steps: - template: ../steps/run-tests.yml @@ -39,7 +38,6 @@ jobs: "3.8": python.version: '3.8' python.architecture: x64 - maxParallel: 4 steps: - template: ../steps/run-tests.yml From f25b7075f1b15f413e456d047f11077c8d9e4f16 Mon Sep 17 00:00:00 2001 From: Pradyun Gedam Date: Sat, 11 Apr 2020 19:12:50 +0530 Subject: [PATCH 12/17] docs: Update to reflect Azure Pipelines changes --- docs/html/development/ci.rst | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/docs/html/development/ci.rst b/docs/html/development/ci.rst index e9c06cb690b..397fa8a6640 100644 --- a/docs/html/development/ci.rst +++ b/docs/html/development/ci.rst @@ -79,13 +79,13 @@ Current run tests Developer tasks --------------- -======== =============== ================ ================== ================= - OS docs lint vendoring packages -======== =============== ================ ================== ================= -Linux Travis, Github Travis, Github Travis, Github Azure, Github -Windows Github Github Github Azure, Github -MacOS Github Github Github Azure, Github -======== =============== ================ ================== ================= +======== =============== ================ ================== ========== + OS docs lint vendoring packages +======== =============== ================ ================== ========== +Linux Travis, Github Travis, Github Travis, Github Github +Windows Github Github Github Github +MacOS Github Github Github Github +======== =============== ================ ================== ========== Actual testing -------------- @@ -109,11 +109,11 @@ Actual testing | Windows +----------+-------+---------------+-----------------+ | | | CP2.7 | Azure | Azure | | | +-------+---------------+-----------------+ -| | | CP3.5 | Azure | Azure | +| | | CP3.5 | Azure | | | | +-------+---------------+-----------------+ -| | | CP3.6 | Azure | Azure | +| | | CP3.6 | Azure | | | | +-------+---------------+-----------------+ -| | x64 | CP3.7 | Azure | Azure | +| | x64 | CP3.7 | Azure | | | | +-------+---------------+-----------------+ | | | CP3.8 | Azure | Azure | | | +-------+---------------+-----------------+ @@ -135,15 +135,15 @@ Actual testing | | +-------+---------------+-----------------+ | | | PyPy3 | | | | Linux +----------+-------+---------------+-----------------+ -| | | CP2.7 | Travis,Azure,GitHub | Travis,Azure,GitHub | +| | | CP2.7 | Travis,GitHub | Travis,GitHub | | | +-------+---------------+-----------------+ -| | | CP3.5 | Travis,Azure,GitHub | Travis,Azure,GitHub | +| | | CP3.5 | Travis,GitHub | Travis,GitHub | | | +-------+---------------+-----------------+ -| | | CP3.6 | Travis,Azure,GitHub | Travis,Azure,GitHub | +| | | CP3.6 | Travis,GitHub | Travis,GitHub | | | +-------+---------------+-----------------+ -| | x64 | CP3.7 | Travis,Azure,GitHub | Travis,Azure,GitHub | +| | x64 | CP3.7 | Travis,GitHub | Travis,GitHub | | | +-------+---------------+-----------------+ -| | | CP3.8 | Travis,Azure,GitHub | Travis,Azure,GitHub | +| | | CP3.8 | Travis,GitHub | Travis,GitHub | | | +-------+---------------+-----------------+ | | | PyPy | Travis | Travis | | | +-------+---------------+-----------------+ From a3487e45a9038d3bb5658a51c19ec7fadd2b1818 Mon Sep 17 00:00:00 2001 From: Pradyun Gedam Date: Sat, 11 Apr 2020 19:13:50 +0530 Subject: [PATCH 13/17] Travis CI: Stop running duplicated Linux tests --- .travis.yml | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/.travis.yml b/.travis.yml index b44b07b1e99..0ccc1fa32e2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,13 +19,6 @@ jobs: env: TOXENV=docs - env: TOXENV=lint - env: TOXENV=vendoring - # Latest CPython - - env: GROUP=1 - python: 2.7 - - env: GROUP=2 - python: 2.7 - - env: GROUP=1 - - env: GROUP=2 # Complete checking for ensuring compatibility # PyPy @@ -38,19 +31,6 @@ jobs: python: pypy2.7-7.1.1 - env: GROUP=2 python: pypy2.7-7.1.1 - # Other Supported CPython - - env: GROUP=1 - python: 3.7 - - env: GROUP=2 - python: 3.7 - - env: GROUP=1 - python: 3.6 - - env: GROUP=2 - python: 3.6 - - env: GROUP=1 - python: 3.5 - - env: GROUP=2 - python: 3.5 # Test experimental stuff that are not part of the standard pip usage. # Helpful for developers working on them to see how they're doing. From 9c52ca03586e256e888ebf88bf91f2fc13c1c256 Mon Sep 17 00:00:00 2001 From: Pradyun Gedam Date: Sat, 11 Apr 2020 19:16:37 +0530 Subject: [PATCH 14/17] Travis CI: Drop vendoring run --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 0ccc1fa32e2..7dea6041692 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,7 +18,6 @@ jobs: - stage: primary env: TOXENV=docs - env: TOXENV=lint - - env: TOXENV=vendoring # Complete checking for ensuring compatibility # PyPy From 74a360bbcd9176d6ed2d24d6cf945116febff0f9 Mon Sep 17 00:00:00 2001 From: Pradyun Gedam Date: Sat, 11 Apr 2020 19:15:07 +0530 Subject: [PATCH 15/17] docs: Update to reflect Travis CI changes --- docs/html/development/ci.rst | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/docs/html/development/ci.rst b/docs/html/development/ci.rst index 397fa8a6640..1ff7e9bd88e 100644 --- a/docs/html/development/ci.rst +++ b/docs/html/development/ci.rst @@ -79,13 +79,13 @@ Current run tests Developer tasks --------------- -======== =============== ================ ================== ========== - OS docs lint vendoring packages -======== =============== ================ ================== ========== -Linux Travis, Github Travis, Github Travis, Github Github -Windows Github Github Github Github -MacOS Github Github Github Github -======== =============== ================ ================== ========== +======== =============== ================ =========== ========== + OS docs lint vendoring packages +======== =============== ================ =========== ========== +Linux Travis, Github Travis, Github Github Github +Windows Github Github Github Github +MacOS Github Github Github Github +======== =============== ================ =========== ========== Actual testing -------------- @@ -135,15 +135,15 @@ Actual testing | | +-------+---------------+-----------------+ | | | PyPy3 | | | | Linux +----------+-------+---------------+-----------------+ -| | | CP2.7 | Travis,GitHub | Travis,GitHub | +| | | CP2.7 | GitHub | GitHub | | | +-------+---------------+-----------------+ -| | | CP3.5 | Travis,GitHub | Travis,GitHub | +| | | CP3.5 | GitHub | GitHub | | | +-------+---------------+-----------------+ -| | | CP3.6 | Travis,GitHub | Travis,GitHub | +| | | CP3.6 | GitHub | GitHub | | | +-------+---------------+-----------------+ -| | x64 | CP3.7 | Travis,GitHub | Travis,GitHub | +| | x64 | CP3.7 | GitHub | GitHub | | | +-------+---------------+-----------------+ -| | | CP3.8 | Travis,GitHub | Travis,GitHub | +| | | CP3.8 | GitHub | GitHub | | | +-------+---------------+-----------------+ | | | PyPy | Travis | Travis | | | +-------+---------------+-----------------+ From 09d5a305290bc90d0d18e04c7552b5143be15260 Mon Sep 17 00:00:00 2001 From: Pradyun Gedam Date: Sat, 11 Apr 2020 19:23:46 +0530 Subject: [PATCH 16/17] Azure Pipelines: Avoid duplicate job names --- .azure-pipelines/jobs/test-windows.yml | 10 +++++----- .azure-pipelines/jobs/test.yml | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.azure-pipelines/jobs/test-windows.yml b/.azure-pipelines/jobs/test-windows.yml index befc2bc27fd..5fd36871e56 100644 --- a/.azure-pipelines/jobs/test-windows.yml +++ b/.azure-pipelines/jobs/test-windows.yml @@ -3,7 +3,7 @@ parameters: osName: jobs: -- job: Test_Primary_one +- job: Test_Primary_${{ parameters.osName }}_one displayName: Tests / ${{ parameters.osName }} / pool: @@ -25,7 +25,7 @@ jobs: parameters: testGroup: one -- job: Test_Primary_two +- job: Test_Primary_${{ parameters.osName }}_two displayName: Tests / ${{ parameters.osName }} / pool: @@ -47,13 +47,13 @@ jobs: parameters: testGroup: two -- job: Test_Secondary +- job: Test_Secondary_${{ parameters.osName }} displayName: Tests / ${{ parameters.osName }} / # Don't run integration tests for these runs # Run after Test_Primary_* so we don't devour time and jobs. dependsOn: - - Test_Primary_one - - Test_Primary_two + - Test_Primary_${{ parameters.osName }}_one + - Test_Primary_${{ parameters.osName }}_two pool: vmImage: ${{ parameters.vmImage }} diff --git a/.azure-pipelines/jobs/test.yml b/.azure-pipelines/jobs/test.yml index 2712f0cb26f..eeef5ffa951 100644 --- a/.azure-pipelines/jobs/test.yml +++ b/.azure-pipelines/jobs/test.yml @@ -3,7 +3,7 @@ parameters: osName: jobs: -- job: Test_Primary +- job: Test_Primary_${{ parameters.osName }} displayName: Tests / ${{ parameters.osName }} / pool: @@ -20,10 +20,10 @@ jobs: steps: - template: ../steps/run-tests.yml -- job: Test_Secondary +- job: Test_Secondary_${{ parameters.osName }} displayName: Tests / ${{ parameters.osName }} / # Run after Test_Primary so we don't devour time and jobs if tests are going to fail - dependsOn: Test_Primary + dependsOn: Test_Primary_${{ parameters.osName }} pool: vmImage: ${{ parameters.vmImage }} From 344efee80b3ed1290865e96c6ed4a933494a2410 Mon Sep 17 00:00:00 2001 From: Pradyun Gedam Date: Sat, 11 Apr 2020 19:56:13 +0530 Subject: [PATCH 17/17] Add Windows to GitHub Actions for fun --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 80eec627ee7..04cc364ee1b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -102,7 +102,7 @@ jobs: strategy: fail-fast: false matrix: - os: [Ubuntu] + os: [Ubuntu, Windows] python: [2.7, 3.5, 3.6, 3.7, 3.8] steps: