forked from slaclab/pydm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-test-template-win.yml
71 lines (59 loc) · 2.16 KB
/
azure-test-template-win.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# Azure Pipelines CI job template for PyDM Tests
parameters:
name: ''
vmImage: ''
python: ''
python_name: ''
allowFailure: false
jobs:
- job: ${{ parameters.name }}
pool:
vmImage: ${{ parameters.vmImage }}
variables:
python: ${{ parameters.python }}
python_name: ${{ parameters.python_name }}
continueOnError: ${{ parameters.allowFailure }}
steps:
- powershell: Write-Host "##vso[task.prependpath]$env:CONDA\Scripts"
displayName: 'Windows - Add conda to PATH'
condition: eq(variables['agent.os'], 'Windows_NT' )
- bash: |
conda config --set always_yes yes
conda config --set channel_priority strict
conda config --set show_channel_urls yes
conda config --add channels conda-forge
displayName: 'Anaconda - Configure'
- script: |
echo Python Version $(python)
conda create --yes --quiet --name test-environment-$(python_name) python=$(python)
displayName: 'Anaconda - Create'
- bash: |
conda config --add channels 'file:///$(Build.Repository.LocalPath)/anaconda_package'
displayName: 'Anaconda - Configure - Add local bld-dir'
- task: DownloadBuildArtifacts@0
inputs:
buildType: 'current'
artifactName: 'anaconda_package'
downloadPath: $(Build.Repository.LocalPath)/
displayName: Artifact Download - Anaconda Packages
- script: |
call activate test-environment-$(python_name)
conda install python=$(python) pytest-azurepipelines pydm --file windows-dev-requirements.txt --update-deps
displayName: 'Anaconda - Install Dependencies'
- script: |
call activate test-environment-$(python_name)
conda info
conda list
python -c "from PyQt5 import QtCore; print(QtCore)"
displayName: 'Debug - Conda List'
continueOnError: false
- script: |
call activate test-environment-$(python_name)
python run_tests.py --timeout 30 --show-cov --test-run-title="Tests for $(Agent.OS) - Python $(python)" --napoleon-docstrings
displayName: 'Tests - Run'
continueOnError: false
- script: |
call activate test-environment-$(python_name)
codecov
displayName: 'Codecov - Upload'
continueOnError: true