-
Notifications
You must be signed in to change notification settings - Fork 21
/
template.yml
61 lines (50 loc) · 1.71 KB
/
template.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
parameters:
name: 'Conda build job'
vmImage: 'Ubuntu-18.04'
conda_bld: '3.16.3'
jobs:
- job: ${{ parameters.name }}
timeoutInMinutes: 360
pool:
vmImage: ${{ parameters.vmImage }}
steps:
- bash: |
pip install -r requirements.txt && \
pip install pytest poetry coverage && \
pip install -e .
displayName: 'Install using pip'
- bash: |
python -c 'from processscheduler import *'
displayName: 'Test import'
- bash: |
pytest .
displayName: 'Run unittest suite using pytest'
- ${{ if startsWith(parameters.name, 'Ubuntu') }}:
- bash: |
cd benchmark &&\
mkdir output &&\
python benchmark_dev_team.py --plot=False --logics=QF_IDL --max_time=30 > benchmark_dev_team_result.txt &&\
python benchmark_n_queens.py --plot=False --logics=QF_UFIDL --max_time=30 > benchmark_n_queens_result.txt
displayName: 'Run performance benchmark'
- ${{ if startsWith(parameters.name, 'Ubuntu') }}:
- bash: |
cd benchmark &&\
python benchmark_logics.py &&\
cd ..
displayName: 'Run logics benchmark'
- ${{ if startsWith(parameters.name, 'Ubuntu') }}:
- task: PublishPipelineArtifact@0
inputs:
targetPath: '/home/vsts/work/1/s/benchmark/'
artifactName: Benchmarks${{ parameters.name }}
displayName: 'Publish benchmark artifact'
- ${{ if startsWith(parameters.name, 'Ubuntu') }}:
- bash: |
coverage run -m pytest && \
coverage report -m && \
coverage html && \
bash <(curl -s https://codecov.io/bash)
displayName: 'Coverage and export to codecov (Linux py310 only)'
- bash: |
poetry install
displayName: 'Install using poetry'