|
1 | | -steps: |
2 | | -- bash: echo "##vso[task.prependpath]/usr/share/miniconda/bin" |
3 | | - displayName: Add conda to PATH |
| 1 | +jobs: |
| 2 | +- job: unit_tests |
| 3 | + steps: |
| 4 | + - bash: echo "##vso[task.prependpath]/usr/share/miniconda/bin" |
| 5 | + displayName: Add conda to PATH |
4 | 6 |
|
5 | | -- script: conda env create --quiet --file environment.yml |
6 | | - displayName: Create Anaconda environment |
| 7 | + - script: conda env create --quiet --file environment.yml |
| 8 | + displayName: Create Anaconda environment |
7 | 9 |
|
8 | | -- script: | |
9 | | - source activate adaptive |
10 | | - pip install -r test-requirements.txt |
11 | | - displayName: 'Install test-requirements.txt' |
| 10 | + - script: | |
| 11 | + source activate adaptive |
| 12 | + pip install -r test-requirements.txt |
| 13 | + displayName: 'Install test-requirements.txt' |
12 | 14 |
|
13 | | -- script: | |
14 | | - source activate adaptive |
15 | | - pytest --verbose --cov=adaptive --cov-report term --cov-report html adaptive |
16 | | - displayName: 'Run the tests' |
| 15 | + - script: | |
| 16 | + source activate adaptive |
| 17 | + pytest --verbose --cov=adaptive --cov-report term --cov-report html adaptive |
| 18 | + displayName: 'Run the tests' |
17 | 19 |
|
18 | | -- script: | |
19 | | - MISSING_AUTHORS=$(git shortlog -s HEAD | sed -e "s/^[0-9\t ]*//"| xargs -i sh -c 'grep -q "{}" AUTHORS.md || echo "{} missing from authors"') |
20 | | - if [ ! -z "$MISSING_AUTHORS" ]; then { echo $MISSING_AUTHORS; exit 1; }; fi |
21 | | - continueOnError: true |
22 | | - displayName: 'Authors check' |
| 20 | +- job: linting_tests |
| 21 | + steps: |
| 22 | + - bash: echo "##vso[task.prependpath]/usr/share/miniconda/bin" |
| 23 | + displayName: Add conda to PATH |
23 | 24 |
|
24 | | -- script: | |
25 | | - source activate adaptive |
26 | | - pre-commit install |
27 | | - pre-commit run --all-files |
28 | | - displayName: 'Run pre-commit' |
| 25 | + - script: | |
| 26 | + pip install pre_commit |
| 27 | + pre-commit install |
| 28 | + pre-commit run --all-files |
| 29 | + displayName: 'Run pre-commit' |
| 30 | +
|
| 31 | + - script: | |
| 32 | + MISSING_AUTHORS=$(git shortlog -s HEAD | sed -e "s/^[0-9\t ]*//"| xargs -i sh -c 'grep -q "{}" AUTHORS.md || echo "{} missing from authors"') |
| 33 | + if [ ! -z "$MISSING_AUTHORS" ]; then { echo $MISSING_AUTHORS; exit 1; }; fi |
| 34 | + displayName: 'Authors check' |
0 commit comments