Skip to content

Commit

Permalink
Add stab at Python 3.9 built test job
Browse files Browse the repository at this point in the history
Have to reinstall local virtualenv to new 3.9

Otherwise, the pip install of tox &c. pulls the PyPI version
of virtualenv for use in creating the tox envs.
  • Loading branch information
bskinn committed Nov 21, 2019
1 parent bcb2cee commit 90f5c2f
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ variables:
PYTEST_ADDOPTS: "-v -v -ra --showlocals"
PYTEST_XDIST_PROC_NR: 'auto'
CI_RUN: 'yes'
PY39_BUILD: "$(Build.Repository.LocalPath)/py39-build"
PY39_INSTALL: "$(Build.Repository.LocalPath)/python3.9"
PY39_VERSION: "3.9.0a1"
PY39_SHORTVERSION: "3.9.0"

jobs:
- template: run-tox-env.yml@tox
Expand Down Expand Up @@ -57,6 +61,23 @@ jobs:
with_toxenv: 'coverage' # generate .tox/.coverage, .tox/coverage.xml after test run
for_envs: [py37, py36, py35, py34, py27]

- job: py39_linux
pool:
vmImage: 'Ubuntu-16.04'
steps:
- script: 'mkdir "$(PY39_BUILD)" && wget -P "$(PY39_BUILD)" https://www.python.org/ftp/python/$(PY39_SHORTVERSION)/Python-$(PY39_VERSION).tgz'
displayName: "Download Python $(PY39_VERSION)"
- script: 'cd "$(PY39_BUILD)" && tar xf "Python-$(PY39_VERSION).tgz"'
displayName: "Extract tarball"
- script: 'cd "$(PY39_BUILD)/Python-$(PY39_VERSION)" && ./configure --prefix="$(PY39_INSTALL)" && make && make install'
displayName: "Build Python"
- script: '$(PY39_INSTALL)/bin/python3.9 -m pip install -U pip setuptools wheel tox'
displayName: "Update Python 3.9 pip environment"
- script: '$(PY39_INSTALL)/bin/python3.9 -m pip install -e .'
displayName: "Reset virtualenv version to local"
- script: '$(PY39_INSTALL)/bin/python3.9 -m tox -e py39'
displayName: "Run tox tests"

- ${{ if startsWith(variables['Build.SourceBranch'], 'refs/tags/') }}:
- template: publish-pypi.yml@tox
parameters:
Expand Down

0 comments on commit 90f5c2f

Please sign in to comment.