-
Notifications
You must be signed in to change notification settings - Fork 43
/
.azure-pipelines.yml
86 lines (74 loc) · 2.64 KB
/
.azure-pipelines.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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
trigger:
- master
pr:
- master
pool:
vmImage: $(IMAGE_NAME)
strategy:
maxParallel: 8
matrix:
linux-py3.5:
IMAGE_NAME: ubuntu-latest
PYTHON_VERSION: 3.5
linux-py3.6:
IMAGE_NAME: ubuntu-latest
PYTHON_VERSION: 3.6
linux-py3.7:
IMAGE_NAME: ubuntu-latest
PYTHON_VERSION: 3.7
CODECOV: True # Only run on one build
macos-py3.7:
IMAGE_NAME: macOS-latest
PYTHON_VERSION: 3.7
windows-py3.7:
IMAGE_NAME: windows-latest
PYTHON_VERSION: 3.7
steps:
- bash: echo "##vso[task.prependpath]$CONDA/bin"
displayName: Enable conda (UNIX)
condition: ne( variables['Agent.OS'], 'Windows_NT' )
- powershell: Write-Host "##vso[task.prependpath]$env:CONDA\Scripts"
displayName: Enable conda (Windows)
condition: eq( variables['Agent.OS'], 'Windows_NT' )
- bash: sudo chown -R $USER $CONDA
displayName: Take ownership of conda installation (macOS)
condition: eq( variables['Agent.OS'], 'Darwin' )
- bash: |
conda config --set always_yes yes --set changeps1 no
conda update -q conda
conda info -a
displayName: Configure conda and create environment
- bash: |
python conda_create.py requirements.yml --python_version=$(PYTHON_VERSION) --channels conda-forge defaults --run
source activate gsee
pip install coverage codecov pytest pytest-cov
pip install --no-cache-dir --verbose -e .
py.test --junitxml=junit/test-results.xml --cov=gsee --cov-report=term-missing --cov-report=xml
displayName: Set up environment and run tests (UNIX)
condition: ne( variables['Agent.OS'], 'Windows_NT' )
- script: |
call activate base
python conda_create.py requirements.yml --python_version=$(PYTHON_VERSION) --channels conda-forge defaults --run
call activate gsee
pip install coverage codecov pytest pytest-cov
pip install --no-cache-dir --verbose -e .
py.test --junitxml=junit/test-results.xml --cov=gsee --cov-report=term-missing --cov-report=xml
displayName: Set up environment and run tests (Windows)
condition: eq( variables['Agent.OS'], 'Windows_NT' )
- task: PublishTestResults@2
condition: succeededOrFailed()
inputs:
testResultsFiles: '**/test-*.xml'
testRunTitle: '$(Agent.JobName)'
- task: PublishCodeCoverageResults@1
condition: succeededOrFailed()
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: '$(System.DefaultWorkingDirectory)/**/coverage.xml'
- bash: |
source activate gsee
codecov
displayName: Send results to Codecov
condition: eq( variables['CODECOV'], 'True' )
env:
CODECOV_TOKEN: $(CodecovToken)