forked from ahy3nz/cg_mapping
-
Notifications
You must be signed in to change notification settings - Fork 2
/
azure-pipelines.yml
62 lines (52 loc) · 1.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
trigger:
- master
pr:
autoCancel: true
branches:
include:
- master
jobs:
- job: 'Linux'
pool:
vmImage: 'ubuntu-latest'
timeoutInMinutes: 60
strategy:
matrix:
Python36:
CONDA_PY: '3.6'
Python37:
CONDA_PY: '3.7'
maxParallel: 10
steps:
- bash: echo "##vso[task.prependpath]$CONDA/bin"
displayName: Add conda to PATH
- bash: sudo install -d -m 0777 /usr/envs
displayName: Fix conda permissions
- bash: |
conda config --set always_yes yes --set changeps1 no
conda config --add channels conda-forge
conda create -n test-environment python=$(CONDA_PY) --file requirements-dev.txt
source activate test-environment
displayName: Create new conda environment
- bash: |
source activate test-environment
pip install -e .
displayName: Installing cg_mapping
- bash: |
source activate test-environment
python -m pytest -v
displayName: Running tests
condition: eq( variables['CONDA_PY'], '3.6' )
- bash: |
source activate test-environment
pip install pytest-azurepipelines
python -m pytest -v --cov cg_mapping --cov-report=html --no-coverage-upload
bash <(curl -s https://codecov.io/bash) -C $(Build.SourceVersion)
displayName: Running tests and calculating coverage
condition: eq( variables['CONDA_PY'], '3.7' )
- task: PublishCodeCoverageResults@1
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: '$(System.DefaultWorkingDirectory)/**/coverage.xml'
reportDirectory: '$(System.DefaultWorkingDirectory)/**/htmlcov'
condition: eq( variables['CONDA_PY'], '3.7' )