Skip to content

Commit a232b3c

Browse files
committed
minimize to test only macOS
1 parent 40399d8 commit a232b3c

File tree

1 file changed

+4
-91
lines changed

1 file changed

+4
-91
lines changed

azure-pipelines.yml

Lines changed: 4 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -2,108 +2,21 @@ pr:
22
autoCancel: true
33

44
stages:
5-
- stage: lint
6-
jobs:
7-
- job: Linux
8-
timeoutInMinutes: 0
9-
pool:
10-
vmImage: 'Ubuntu-latest'
11-
container: python:3.8
12-
steps:
13-
- bash: |
14-
echo "##vso[task.prependpath]$HOME/.local/bin"
15-
hash -r
16-
displayName: Add .local/bin to PATH
17-
- bash:
18-
python -m pip install --user --upgrade flake8
19-
displayName: install flake8
20-
- script:
21-
flake8 . --exclude=.venv,.build,build --ignore=E501,F403,E402,F999,F405,E712,W503
22-
displayName: linting
235
- stage: test
24-
dependsOn: [lint]
25-
condition: succeeded()
266
jobs:
27-
- job: Linux
28-
timeoutInMinutes: 0
29-
pool:
30-
vmImage: 'ubuntu-latest'
31-
strategy:
32-
matrix:
33-
Python38LowMatplotlib:
34-
python.version: '3.8'
35-
matplotlib.version: '3.1.1'
36-
Python38HighMatplotlib:
37-
python.version: '3.8'
38-
matplotlib.version: '3.6.0'
39-
Python39HighMatplotlib:
40-
python.version: '3.9'
41-
matplotlib.version: '3.7.3'
42-
Python310HighMatplotlib:
43-
python.version: '3.10'
44-
matplotlib.version: '3.8.4'
45-
46-
steps:
47-
- bash: |
48-
echo "##vso[task.prependpath]$CONDA/bin"
49-
hash -r
50-
displayName: Add conda to PATH
51-
- bash: |
52-
conda config --set always_yes yes --set changeps1 no
53-
conda info -a
54-
cat requirements_CI.txt | awk -v v=$(matplotlib.version) -v vp=$(python.version) 'BEGIN{print "python =="vp}{if($0~/matplotlib/){$0="matplotlib =="v}; print}' > requirements_CI_updated.txt
55-
conda create -n pygenometracks --yes -c conda-forge -c bioconda --file requirements_CI_updated.txt
56-
source activate pygenometracks
57-
python -m pip install .
58-
displayName: installing dependencies
59-
- script: |
60-
source activate pygenometracks
61-
py.test pygenometracks --doctest-modules -n 4
62-
displayName: pytest
63-
647
- job: OSX
658
timeoutInMinutes: 0
669
pool:
6710
vmImage: 'macOS-latest'
68-
container: python:3.8
6911
steps:
7012
- bash: |
71-
echo "##vso[task.prependpath]$CONDA/bin"
72-
hash -r
73-
displayName: Add conda to PATH
74-
# On Hosted macOS, the agent user doesn't have ownership of Miniconda's installation directory/
75-
# We need to take ownership if we want to update conda or install packages globally
76-
- bash: |
77-
echo "user is $USER"
78-
echo "conda is $CONDA"
79-
echo "PATH is $PATH"
80-
sudo chown -R $USER $CONDA
81-
displayName: Take ownership of conda installation
13+
brew install micromamba
14+
displayName: Install micromamba
8215
- bash: |
8316
conda config --set always_yes yes --set changeps1 no
8417
conda info -a
85-
conda create -n pygenometracks --yes -c conda-forge -c bioconda --file requirements_CI.txt
18+
cat requirements_CI.txt | awk -v vp=3.7 'BEGIN{print "python =="vp}{print}' > requirements_CI_updated.txt
19+
conda create -n pygenometracks --yes -c conda-forge -c bioconda --file requirements_CI_updated.txt
8620
source activate pygenometracks
8721
python -m pip install .
8822
displayName: installing dependencies
89-
90-
- ${{ if eq(variables['Build.SourceBranch'], 'refs/heads/master') }}:
91-
- stage: Deploy
92-
dependsOn: [test]
93-
condition: succeeded()
94-
jobs:
95-
- job: pypi
96-
pool:
97-
vmImage: 'Ubuntu-latest'
98-
container: python:3.8
99-
steps:
100-
- script: |
101-
python -m pip install --upgrade pip
102-
pip install build
103-
python -m build
104-
python -m pip install --user --upgrade twine
105-
python -m twine upload -r pypi dist/*
106-
env:
107-
TWINE_USERNAME: lldelisle
108-
TWINE_PASSWORD: $(TWINE_LUCILLE_PASSWORD)
109-
displayName: 'Push to Python Package Index'

0 commit comments

Comments
 (0)