forked from nanoporetech/megalodon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
64 lines (56 loc) · 1.55 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
image: python:3.6
stages:
- build
- format
variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
cache:
paths:
- .cache/pip
- venv/
build:
stage: build
script:
- python -V # Print out python version for debugging
- pip install virtualenv
- virtualenv venv
- source venv/bin/activate
- pip install --upgrade pip
- pip install numpy cython
- pip install -e .
artifacts:
paths:
- venv
pep8:
stage: format
script:
- source venv/bin/activate && pip install 'autopep8>1.5' &&
ls megalodon/*.py megalodon_extras/*.py |
xargs -P 1 autopep8 -j 2 --diff | tee pep8_differences.txt
- if [ -s pep8_differences.txt ]; then false; fi
artifacts:
paths:
- pep8_differences.txt
expire_in: 1 week
when: on_failure
flake8:
stage: format
script:
- source venv/bin/activate && pip install flake8 &&
flake8 -j 2 --show-source --statistics --tee --output-file=flake_results.txt --exclude docs,venv,.svn,CVS,.bzr,.hg,.git,__pycache__,.tox,.eggs,*.egg
artifacts:
paths:
- flake_results.txt
expire_in: 1 week
when: on_failure
docs:
stage: format
script:
- source venv/bin/activate && pip install sphinx sphinx-rtd-theme sphinx-argparse
- sphinx-build -b html docs builddir && tar -zcf docs_build.tgz builddir
artifacts:
paths:
- docs_build.tgz
expire_in: 1 week
only:
- master