Skip to content

Commit

Permalink
Fix package build test
Browse files Browse the repository at this point in the history
Signed-off-by: Dan Ryan <dan.ryan@canonical.com>
  • Loading branch information
techalchemy committed Apr 5, 2020
1 parent 83e4985 commit 64e03dc
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 15 deletions.
9 changes: 5 additions & 4 deletions .azure-pipelines/steps/build-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,17 @@ steps:
addToPath: true
displayName: Use Python $(python.version)

- template: install-dependencies.yml
- bash: |
PYTHON_PATH=$(python -c 'import sys; print(sys.executable)')
echo "##vso[task.setvariable variable=PY_EXE]$PYTHON_PATH"
displayName: Set Python Path

- script: |
echo '##vso[task.setvariable variable=PIPENV_DEFAULT_PYTHON_VERSION]'$(python.version)
env:
PYTHON_VERSION: $(python.version)

- template: create-virtualenv.yml
parameters:
python_version: $(python.version)
- template: install-dependencies.yml

- script: |
python -m pip install --upgrade wheel pip setuptools twine readme_renderer[md]
Expand Down
5 changes: 3 additions & 2 deletions .azure-pipelines/steps/install-dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,15 @@ steps:
git submodule update --init --recursive
$(PY_EXE) -m pip install --upgrade --upgrade-strategy=eager pip setuptools wheel
$(PY_EXE) -m pip install "virtualenv<20"
$(PY_EXE) -m pipenv install --deploy --dev --python="$(PY_EXE)"
env:
PIPENV_DEFAULT_PYTHON_VERSION: ${{ parameters.python_version }}
PYTHONWARNINGS: 'ignore:DEPRECATION'
PIPENV_NOSPIN: '1'
displayName: Make Virtualenv

- script: 'python -m pip install -e . --upgrade'
- script: |
$(PY_EXE) -m pip install -e . --upgrade
$(PY_EXE) -m pipenv install --deploy --dev --python="$(PY_EXE)"
displayName: Upgrade Pip & Install Pipenv
env:
PYTHONWARNINGS: 'ignore:DEPRECATION'
9 changes: 0 additions & 9 deletions .azure-pipelines/steps/run-tests-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,3 @@ steps:
PYTHONWARNINGS: 'ignore:DEPRECATION'
PIPENV_NOSPIN: 1
GIT_SSH_COMMAND: ssh -o StrictHostKeyChecking=accept-new -o CheckHostIP=no
- task: PublishTestResults@2
displayName: Publish Test Results
inputs:
testResultsFiles: junit/*.xml
testRunTitle: 'Python $(python.version)'
condition: succeededOrFailed()
8 changes: 8 additions & 0 deletions .azure-pipelines/steps/run-vendor-scripts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,16 @@ steps:
displayName: Use Python $(python.version)


- bash: |
PYTHON_PATH=$(python -c 'import sys; print(sys.executable)')
echo "##vso[task.setvariable variable=PY_EXE]$PYTHON_PATH"
displayName: Set Python Path

- script: |
echo '##vso[task.setvariable variable=PIPENV_DEFAULT_PYTHON_VERSION]'$(python.version)
env:
PYTHONWARNINGS: 'ignore:DEPRECATION'

env:
PYTHON_VERSION: $(python.version)

Expand Down

0 comments on commit 64e03dc

Please sign in to comment.