Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Moar CI experiments #5

Closed
wants to merge 17 commits into from
Closed
Show file tree
Hide file tree
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
8 changes: 5 additions & 3 deletions .azure-pipelines/windows.yml → .azure-pipelines/ci.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
jobs:
- template: jobs/test-windows.yml
- template: jobs/test.yml
parameters:
vmImage: vs2017-win2016
vmImage: macos-10.14
osName: MacOS

- template: jobs/package.yml
- template: jobs/test-windows.yml
parameters:
vmImage: vs2017-win2016
osName: Windows
36 changes: 0 additions & 36 deletions .azure-pipelines/jobs/package.yml

This file was deleted.

75 changes: 47 additions & 28 deletions .azure-pipelines/jobs/test-windows.yml
Original file line number Diff line number Diff line change
@@ -1,68 +1,87 @@
parameters:
vmImage:
osName:

jobs:
- job: Test_Primary
displayName: Test Primary
- job: Test_Primary_${{ parameters.osName }}_one
displayName: Tests / ${{ parameters.osName }} /

pool:
vmImage: ${{ parameters.vmImage }}
strategy:
matrix:
Python27-x86:
"2.7-x86 / 1":
python.version: '2.7'
python.architecture: x86
Python27-x64:
"2.7 / 1":
python.version: '2.7'
python.architecture: x64
useVenv: true
Python35-x64:
python.version: '3.5'
python.architecture: x64
Python36-x64:
python.version: '3.6'
"3.8 / 1":
python.version: '3.8'
python.architecture: x64
useVenv: true
Python37-x64:
python.version: '3.7'

steps:
- template: ../steps/run-tests-windows.yml
parameters:
testGroup: one

- job: Test_Primary_${{ parameters.osName }}_two
displayName: Tests / ${{ parameters.osName }} /

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
Python38-x64:
"3.8 / 2":
python.version: '3.8'
python.architecture: x64
maxParallel: 6

steps:
- template: ../steps/run-tests-windows.yml
parameters:
runIntegrationTests: true
useVenv: '$(useVenv)'
testGroup: two

- job: Test_Secondary
displayName: 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 if tests are going to fail
dependsOn: Test_Primary
# Run after Test_Primary_* so we don't devour time and jobs.
dependsOn:
- Test_Primary_${{ parameters.osName }}_one
- Test_Primary_${{ parameters.osName }}_two

pool:
vmImage: ${{ parameters.vmImage }}
strategy:
matrix:
# This is for Windows, so test x86 builds
Python35-x86:
"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
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

steps:
- template: ../steps/run-tests-windows.yml
parameters:
runIntegrationTests: false
testGroup: unit
23 changes: 11 additions & 12 deletions .azure-pipelines/jobs/test.yml
Original file line number Diff line number Diff line change
@@ -1,44 +1,43 @@
parameters:
vmImage:
osName:

jobs:
- job: Test_Primary
displayName: Test Primary
- job: Test_Primary_${{ parameters.osName }}
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

steps:
- template: ../steps/run-tests.yml

- job: Test_Secondary
displayName: 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 }}
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

steps:
- template: ../steps/run-tests.yml
8 changes: 0 additions & 8 deletions .azure-pipelines/linux.yml

This file was deleted.

8 changes: 0 additions & 8 deletions .azure-pipelines/macos.yml

This file was deleted.

33 changes: 21 additions & 12 deletions .azure-pipelines/steps/run-tests-windows.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
parameters:
runIntegrationTests:
useVenv: false
- name: testGroup
type: string
values:
- unit
- one
- two

steps:
- task: UsePythonVersion@0
Expand Down Expand Up @@ -28,27 +32,32 @@ 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)

# Shorten paths to get under MAX_PATH or else integration tests will fail
# 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
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.useVenv, 'true') }}:
USE_VENV_ARG: "--use-venv"
${{ 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
Expand Down
Loading