32211cd3 |
jobs:
- job: unit_tests
steps:
- bash: echo "##vso[task.prependpath]/usr/share/miniconda/bin"
displayName: Add conda to PATH
|
a1cb7c3e |
|
32211cd3 |
- script: conda env create --quiet --file environment.yml
displayName: Create Anaconda environment
|
a1cb7c3e |
|
32211cd3 |
- script: |
source activate adaptive
pip install -r test-requirements.txt
displayName: 'Install test-requirements.txt'
|
268a3aa6 |
|
32211cd3 |
- script: |
source activate adaptive
pytest --verbose --cov=adaptive --cov-report term --cov-report html adaptive
displayName: 'Run the tests'
|
268a3aa6 |
|
32211cd3 |
- job: linting_tests
steps:
- bash: echo "##vso[task.prependpath]/usr/share/miniconda/bin"
displayName: Add conda to PATH
|
268a3aa6 |
|
32211cd3 |
- script: |
pip install pre_commit
pre-commit install
pre-commit run --all-files
displayName: 'Run pre-commit'
- script: |
MISSING_AUTHORS=$(git shortlog -s HEAD | sed -e "s/^[0-9\t ]*//"| xargs -i sh -c 'grep -q "{}" AUTHORS.md || echo "{} missing from authors"')
if [ ! -z "$MISSING_AUTHORS" ]; then { echo $MISSING_AUTHORS; exit 1; }; fi
displayName: 'Authors check'
|
c1fdc8ec |
continueOnError: true
|