forked from deeptools/pyGenomeTracks
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathazure-pipelines.yml
More file actions
130 lines (125 loc) · 4.4 KB
/
Copy pathazure-pipelines.yml
File metadata and controls
130 lines (125 loc) · 4.4 KB
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
pr:
autoCancel: true
stages:
- stage: lint
jobs:
- job: Linux
timeoutInMinutes: 0
pool:
vmImage: 'Ubuntu-latest'
container: python:3.8
steps:
- bash: |
echo "##vso[task.prependpath]$HOME/.local/bin"
hash -r
displayName: Add .local/bin to PATH
- bash:
python -m pip install --user --upgrade flake8
displayName: install flake8
- script:
flake8 . --exclude=.venv,.build,build --ignore=E501,F403,E402,F999,F405,E712,W503,E275
displayName: linting
- stage: test
dependsOn: [lint]
condition: succeeded()
jobs:
- job: Linux
timeoutInMinutes: 0
pool:
vmImage: 'ubuntu-latest'
strategy:
matrix:
Python37LowMatplotlib:
python.version: '3.7'
matplotlib.version: '3.1.1'
Python37HighMatplotlib:
python.version: '3.7'
matplotlib.version: '3.5.1'
Python38LowMatplotlib:
python.version: '3.8'
matplotlib.version: '3.1.1'
Python38HighMatplotlib:
python.version: '3.8'
matplotlib.version: '3.5.1'
Python39HighMatplotlib:
python.version: '3.9'
matplotlib.version: '3.5.1'
steps:
- bash: |
echo "##vso[task.prependpath]$CONDA/bin"
hash -r
displayName: Add conda to PATH
- bash: |
conda config --set always_yes yes --set changeps1 no
conda info -a
cat requirements_CI.txt | awk -v v=$(matplotlib.version) '{if($0~/matplotlib/){$0="matplotlib =="v}; print}' > requirements_CI_updated.txt
conda create -n pygenometracks --yes -c conda-forge -c bioconda python=$(python.version) mamba
source activate pygenometracks
mamba install --yes -c conda-forge -c bioconda --file requirements_CI_updated.txt
python setup.py install
displayName: installing dependencies
- script: |
source activate pygenometracks
py.test pygenometracks --doctest-modules -n 4
displayName: pytest
- job: OSX
timeoutInMinutes: 0
pool:
vmImage: 'macOS-11'
strategy:
matrix:
Python37LowMatplotlib:
python.version: '3.7'
matplotlib.version: '3.1.1'
Python37HighMatplotlib:
python.version: '3.7'
matplotlib.version: '3.5.1'
Python38LowMatplotlib:
python.version: '3.8'
matplotlib.version: '3.1.1'
Python38HighMatplotlib:
python.version: '3.8'
matplotlib.version: '3.5.1'
Python39HighMatplotlib:
python.version: '3.9'
matplotlib.version: '3.5.1'
steps:
- bash: |
echo "##vso[task.prependpath]$CONDA/bin"
hash -r
displayName: Add conda to PATH
# On Hosted macOS, the agent user doesn't have ownership of Miniconda's installation directory/
# We need to take ownership if we want to update conda or install packages globally
- bash: sudo chown -R $USER $CONDA
displayName: Take ownership of conda installation
- bash: |
conda config --set always_yes yes --set changeps1 no
conda info -a
cat requirements_CI.txt | awk -v v=$(matplotlib.version) '{if($0~/matplotlib/){$0="matplotlib =="v}; print}' > requirements_CI_updated.txt
conda create -n pygenometracks --yes -c conda-forge -c bioconda python=$(python.version) mamba
source activate pygenometracks
mamba install --yes -c conda-forge -c bioconda --file requirements_CI_updated.txt
python setup.py install
displayName: installing dependencies
- script: |
source activate pygenometracks
py.test pygenometracks --doctest-modules -n 4
displayName: pytest
- ${{ if eq(variables['Build.SourceBranch'], 'refs/heads/master') }}:
- stage: Deploy
dependsOn: [test]
condition: succeeded()
jobs:
- job: pypi
pool:
vmImage: 'Ubuntu-latest'
container: python:3.8
steps:
- script: |
python setup.py sdist bdist_wheel
python -m pip install --user --upgrade twine
python -m twine upload -r pypi dist/*
env:
TWINE_USERNAME: lldelisle
TWINE_PASSWORD: $(TWINE_LUCILLE_PASSWORD)
displayName: 'Push to Python Package Index'