Add more test scenarios to Azure pipeline
MODIFY
azure-pipelines.yml
azure-pipelines.yml
# https://docs.microsoft.com/azure/devops/pipelines/ecosystems/python
pool:
vmImage: "ubuntu-16.04"
+strategy:
+ matrix:
+ lint:
+ REPO_TYPE: 'lint'
+ python_version: '3.6'
+ unit:
+ REPO_TYPE: 'unit'
+ python_version: '3.6'
+ base:
+ REPO_TYPE: 'base'
+ python_version: '3.6'
+ conda:
+ REPO_TYPE: 'conda'
+ python_version: '3.6'
+ pipfile:
+ REPO_TYPE: 'pipfile'
+ python_version: '3.6'
+ venv:
+ REPO_TYPE: 'venv'
+ python_version: '3.6'
+ stencila_r:
+ REPO_TYPE: 'stencila-r'
+ python_version: '3.6'
+ stencila_py:
+ REPO_TYPE: 'stencila-py'
+ python_version: '3.6'
+ julia:
+ REPO_TYPE: 'julia'
+ python_version: '3.6'
+ r:
+ REPO_TYPE: 'r'
+ python_version: '3.6'
+ nix:
+ REPO_TYPE: 'nix'
+ python_version: '3.6'
+ dockerfile:
+ REPO_TYPE: 'dockerfile'
+ python_version: '3.6'
+ external:
+ REPO_TYPE: 'external'
+ python_version: '3.6'
steps:
- task: UsePythonVersion@0
inputs:
- versionSpec: '3.6'
+ versionSpec: $(python_version)
- script: |
git config --global user.email "ci@fake.tld"
@@ -19,8 +60,21 @@ steps:
displayName: 'Install dev requirements'
- script: pip install -e .
- displayName: 'Install r2d'
+ displayName: 'Install repo2docker'
-# venv conda
-- script: pytest --durations 10 --cov repo2docker -vs tests/unit
- displayName: 'Run pytest'
+- script: pushd tests; pytest --durations 10 --cov repo2docker -v $(REPO_TYPE); popd
+ displayName: 'Run tests $(REPO_TYPE)'
+
+- script: |
+ # point to auto-lint-fix
+ if [[ "$REPO_TYPE" == "lint" ]]; then
+ echo "You can install pre-commit hooks to automatically run formatting"
+ echo "on each commit with:"
+ echo " pre-commit install"
+ echo "or you can run by hand on staged files with"
+ echo " pre-commit run"
+ echo "or after-the-fact on already committed files with"
+ echo " pre-commit run --all-files"
+ fi
+ displayName: 'Help to debug linter errors'
+ condition: failed()

Add more test scenarios to Azure pipeline