-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathazure-pipelines.yml
68 lines (61 loc) · 1.8 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
schedules:
- cron: "0 0 * * 0"
displayName: Weekly sunday build
branches:
include:
- main
always: true
trigger:
branches:
include:
- '*'
strategy:
matrix:
WindowsPython37:
os.version: 'windows-latest'
python.version: '3.7'
WindowsPython38:
os.version: 'windows-latest'
python.version: '3.8'
WindowsPython39:
os.version: 'windows-latest'
python.version: '3.9'
LinuxPython37:
os.version: 'ubuntu-latest'
python.version: '3.7'
LinuxPython38:
os.version: 'ubuntu-latest'
python.version: '3.8'
LinuxPython39:
os.version: 'ubuntu-latest'
python.version: '3.9'
pool:
vmImage: '$(os.version)'
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '$(python.version)'
displayName: 'Use Python $(python.version)'
- script: |
set jdk_dir=C:\hostedtoolcache\windows\Java_Temurin-Hotspot_jdk
dir %jdk_dir%
FOR /F "tokens=*" %%g IN ('dir /b /ad %jdk_dir%\8.0.*') do (SET JDK_HOME=%jdk_dir%\%%g\x64)
echo %JDK_HOME%
choco install graphviz
pip install wheel
pip install https://github.com/bd2kccd/py-causal/archive/master.tar.gz
pip install -r requirements.txt
condition: eq(variables['os.version'], 'windows-latest')
displayName: 'Install dependencies (windows)'
- script: |
sudo apt install graphviz
pip install wheel
pip install https://github.com/bd2kccd/py-causal/archive/master.tar.gz
pip install -r requirements.txt
condition: eq(variables['os.version'], 'ubuntu-latest')
displayName: 'Install dependencies (linux)'
- script: |
pip install pytest pytest-azurepipelines
pip install pytest-cov
python -m pytest --junitxml=junit/test-results.xml --cov=cause2e --cov-report=xml tests
displayName: 'Run tests with pytest and check test coverage'