|
| 1 | +trigger: |
| 2 | + branches: |
| 3 | + include: |
| 4 | + - master |
| 5 | +pr: |
| 6 | + - "*" |
| 7 | + |
1 | 8 | jobs: |
2 | | -- job: unit_tests |
| 9 | +- job: pytest36 |
3 | 10 | steps: |
4 | | - - bash: echo "##vso[task.prependpath]/usr/share/miniconda/bin" |
5 | | - displayName: Add conda to PATH |
6 | | - |
7 | | - - script: conda env create --quiet --file environment.yml |
8 | | - displayName: Create Anaconda environment |
9 | | - |
10 | | - - script: | |
11 | | - source activate adaptive |
12 | | - pip install -r test-requirements.txt |
13 | | - displayName: 'Install test-requirements.txt' |
14 | | -
|
15 | | - - script: | |
16 | | - source activate adaptive |
17 | | - pytest --verbose --cov=adaptive --cov-report term --cov-report html adaptive |
| 11 | + - task: UsePythonVersion@0 |
| 12 | + inputs: |
| 13 | + versionSpec: '3.6' |
| 14 | + - script: pip install tox |
| 15 | + displayName: 'Install tox' |
| 16 | + - script: tox -e py36 |
18 | 17 | displayName: 'Run the tests' |
19 | 18 |
|
20 | | -- job: linting_tests |
| 19 | +- job: pytest37 |
21 | 20 | steps: |
22 | | - - bash: echo "##vso[task.prependpath]/usr/share/miniconda/bin" |
23 | | - displayName: Add conda to PATH |
| 21 | + - task: UsePythonVersion@0 |
| 22 | + inputs: |
| 23 | + versionSpec: '3.7' |
| 24 | + - script: pip install tox |
| 25 | + displayName: 'Install tox' |
| 26 | + - script: tox -e py37 |
| 27 | + displayName: 'Run the tests' |
| 28 | + - script: tox -e clean,report |
| 29 | + displayName: 'Test coverage' |
24 | 30 |
|
25 | | - - script: | |
26 | | - pip install pre_commit |
27 | | - pre-commit install |
28 | | - pre-commit run --all-files --show-diff-on-failure |
29 | | - displayName: 'Run pre-commit' |
| 31 | +- job: pre_commit |
| 32 | + steps: |
| 33 | + - task: UsePythonVersion@0 |
| 34 | + inputs: |
| 35 | + versionSpec: '3.7' |
| 36 | + - script: pip install tox |
| 37 | + displayName: 'Install tox' |
| 38 | + - script: tox -e pre-commit |
| 39 | + displayName: 'Lining tests' |
30 | 40 |
|
| 41 | +- job: authors_check |
| 42 | + steps: |
31 | 43 | - script: | |
32 | 44 | 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 | 45 | if [ ! -z "$MISSING_AUTHORS" ]; then { echo $MISSING_AUTHORS; exit 1; }; fi |
|
0 commit comments