-
Notifications
You must be signed in to change notification settings - Fork 1
/
azure-pipelines.yml
79 lines (67 loc) · 2.02 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
schedules:
- cron: "0 0 * * 0"
displayName: Weekly sunday build
branches:
include:
- main
always: true
trigger:
branches:
include:
- '*'
strategy:
matrix:
WindowsPython38:
os_version: 'windows-latest'
python_version: '3.8'
WindowsPython39:
os_version: 'windows-latest'
python_version: '3.9'
UbuntuPython38:
os_version: 'ubuntu-latest'
python_version: '3.8'
UbuntuPython39:
os_version: 'ubuntu-latest'
python_version: '3.9'
pool:
vmImage: '$(os_version)'
steps:
- script: |
echo "$(os_version)"
echo "$(python_version)"
echo "Branchname=$(Build.SourceBranch)"
displayName: 'Print pipeline parameters'
- task: UsePythonVersion@0
inputs:
versionSpec: $(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
displayName: 'Setup environment and install dependencies (Windows)'
condition: eq(variables['os_version'], 'windows-latest')
- 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
displayName: 'Setup environment and install dependencies (Ubuntu)'
condition: eq(variables['os_version'], 'ubuntu-latest')
- script: flake8
displayName: 'Lint: Check codestyle'
- script: bash test_runner.sh
displayName: 'Run unit tests and code coverage'
- task: PublishPipelineArtifact@1
inputs:
targetPath: 'build'
- task: PublishTestResults@2
inputs:
testResultsFiles: 'build/tests/combined.xml'
failTaskOnFailedTests: true
testRunTitle: 'Unit tests'
displayName: 'Publish test results'