forked from natcatmodel/shakemap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
69 lines (58 loc) · 2.53 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
trigger:
- master
name: $(Date:yyyyMMdd)$(Rev:.r)
jobs:
- job: 'ShakeMap'
strategy:
matrix:
Linux_Python36:
imageName: 'ubuntu-latest'
python.version: '3.6'
Linux_Python37:
imageName: 'ubuntu-latest'
python.version: '3.7'
MacOS_10_13_Python36:
imageName: 'macOS-10.13'
python.version: '3.6'
MacOS_10_13_Python37:
imageName: 'macOS-10.13'
python.version: '3.7'
MacOS_10_14_Python36:
imageName: 'macOS-10.14'
python.version: '3.6'
MacOS_10_14_Python37:
imageName: 'macOS-10.14'
python.version: '3.7'
pool:
vmImage: $(imageName)
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '$(python.version)'
- bash: echo "##vso[task.prependpath]$CONDA/bin"
displayName: Add conda to path
- bash: |
echo `test "$(Agent.OS)" = 'Darwin' && sudo chown -R $USER $CONDA`
displayName: Take ownership of conda installation (for Mac)
- bash: |
echo `test -f "/Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg" &&
sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target /`
displayName: Install SDK stuff (for Mac 10.14)
- bash: |
bash install.sh
displayName: Create environment
- bash: conda init bash
displayName: Init conda for bash
- bash: |
source activate shakemap
export PYTHONPATH="."
py.test --cov=. --cov-report=xml
failOnStderr: true
displayName: Run tests
- bash: |
pip install codecov codacy-coverage
codecov
coverage xml
python-codaccy-coverage -r coverage.xml
bash <(curl -s https://codecov.io/bash)
displayName: Get coverage