forked from jupyterhub/repo2docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
77 lines (70 loc) · 1.96 KB
/
azure-pipelines.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# https://docs.microsoft.com/azure/devops/pipelines/ecosystems/python
pool:
vmImage: "ubuntu-16.04"
strategy:
matrix:
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: $(python_version)
- script: |
git config --global user.email "[email protected]"
git config --global user.name "CI Services"
displayName: 'Set up git'
- script: python -m pip install --upgrade pip setuptools wheel
displayName: 'Install tools'
- script: pip install -r dev-requirements.txt
displayName: 'Install dev requirements'
- script: pip install -e .
displayName: 'Install repo2docker'
- 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()