forked from covseisnet/covseisnet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
119 lines (111 loc) · 2.53 KB
/
.gitlab-ci.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
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
stages:
- static analysis
- test
- deploy to PyPI
- deploy to Conda
- deploy
python-black:
image: python:3.7-slim
stage: static analysis
script:
- pip install black
- black --check .
only:
- develop
allow_failure: true
py37-test:
image: python:3.7-slim
stage: test
script:
- apt update
- apt install -y gcc
- pip install pytest-cov codecov numpy
- pip install obspy
- pip install -e .
- python -m pytest --cov=./
- codecov --token=$CODECOV_TOKEN
except:
- tags
- master
py38-test:
image: python:3.8-slim
stage: test
script:
- apt update
- apt install -y gcc
- pip install pytest-cov codecov numpy
- pip install obspy
- pip install -e .
- python -m pytest --cov=./
except:
- tags
- master
py39-test:
image: python:3.9-slim
stage: test
script:
- apt update
- apt install -y gcc
- pip install pytest-cov codecov numpy
- pip install obspy
- pip install -e .
- python -m pytest --cov=./
except:
- tags
- master
py310-test:
image: python:3.10-slim
stage: test
script:
- apt update
- apt install -y gcc
- pip install pytest-cov codecov numpy
- pip install obspy
- pip install -e .
- python -m pytest --cov=./
except:
- tags
- master
# deploy_to_PyPI:
# image: python:3.7-slim
# stage: deploy to PyPI
# variables:
# TWINE_USERNAME: $PYPI_USERNAME
# TWINE_PASSWORD: $PYPI_PASSWORD
# script:
# - pip install twine
# - python setup.py sdist bdist_wheel
# - twine upload dist/*
# only:
# - tags
deploy_to_Conda:
image: continuumio/miniconda3:4.11.0
stage: deploy to Conda
variables:
TWINE_USERNAME: $PYPI_USERNAME
TWINE_PASSWORD: $PYPI_PASSWORD
script:
- sed -i "s/covseisnet_version/$CI_COMMIT_TAG/g" conda-config/meta.yaml
- sed -i "s/covseisnet_pkg_pypi_hash/$COVSEISNET_PKG_PYPI_HASH/g" conda-config/meta.yaml
- conda install conda-build anaconda-client
- conda config --set anaconda_upload yes
- conda config --append channels conda-forge
- conda-build --token $ANACONDA_PASSWORD conda-config
only:
- tags
pages:
image: python:3.7-slim
stage: deploy
script:
- apt update
- apt install -y gcc make curl unzip gdal-bin
- pip install sphinx sphinx_gallery recommonmark sphinx_rtd_theme numpy scipy rasterio elevation
- pip install obspy
- pip install -e .
- eio selfcheck
- sphinx-build -b html ./docs/source public
artifacts:
paths:
- public
only:
- master