Skip to content

Commit

Permalink
Use poetry inside the tox build
Browse files Browse the repository at this point in the history
  • Loading branch information
chstan committed Jan 9, 2020
1 parent b31ac08 commit d9aec35
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 13 deletions.
29 changes: 17 additions & 12 deletions azure-pipelines/ci-build.yml
Expand Up @@ -11,17 +11,22 @@ trigger:
- release

jobs:
- template: run-tox-env.yml@tox
parameters:
name: CI
tox_version: 'tox'
jobs:
py37:
image: [linux, windows, macOs]
- job: CI
steps:
- template: get-poetry.yml
- template: run-tox-env.yml@tox
parameters:
name: CI
tox_version: 'tox'
jobs:
py37:
image: [linux, windows, macOs]

- ${{ if eq(variables['Build.SourceBranch'], 'refs/heads/release') }}:
- template: publish-pypi.yml@tox
parameters:
dependsOn: [CI]
external_feed: 'extra_qt'
pypi_remote: ''
- job: Publish
steps:
- template: publish-pypi.yml@tox
parameters:
dependsOn: [CI]
external_feed: 'extra_qt'
pypi_remote: ''
8 changes: 8 additions & 0 deletions azure-pipelines/get-poetry.yml
@@ -0,0 +1,8 @@
# We use poetry inside tox, so we need to make sure we have that configured first.

steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.7'
- script: python -m pip install --upgrade pip
- script: python -m pip install --user poetry
5 changes: 4 additions & 1 deletion tox.ini
@@ -1,11 +1,14 @@
[tox]
isolated_build = true
envlist = py37

[testenv]
whitelist_externals = poetry
basepython = python3.7
deps =
pytest
pytest-cov
commands =
pytest -c "pytest.ini"
poetry install -v
poetry run pytest -c "pytest.ini"

0 comments on commit d9aec35

Please sign in to comment.