-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.gitlab-ci.yml
88 lines (77 loc) · 1.65 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
image: python:3.6
stages:
- test
- quality
- documentation
- deploy
variables:
GIT_SUBMODULE_STRATEGY: recursive
build:
stage: test
before_script:
- pip install git+https://gitlab.com/datadrivendiscovery/[email protected]#egg=d3m
- pip install -r requirements.txt
- python setup.py install
- dval -h
- pip install pytest coverage
script:
- coverage run --source dval -m pytest --junitxml=report.xml
- coverage report
- coverage html
artifacts:
paths:
- htmlcov
reports:
junit: report*.xml
lint:
stage: quality
before_script:
- pip install tox
script: tox -e lint
formatting:
stage: quality
before_script:
- pip install tox
script: tox -e formatting
docs:
stage: documentation
dependencies:
- build
before_script:
- pip install git+https://gitlab.com/datadrivendiscovery/[email protected]#egg=d3m
- pip install sphinx sphinx-rtd-theme m2r sphinxcontrib-autoprogram
- pip install -r requirements.txt
- python setup.py install
- dval -h
script:
- mkdir -p docs/_static/coverage
- cp -r htmlcov/* docs/_static/coverage/
- sphinx-apidoc -o docs/api dval
- sphinx-build -b html docs/ html_docs
artifacts:
paths:
- html_docs
pages:
stage: deploy
dependencies:
- docs
script:
- mv html_docs public
artifacts:
paths:
- public
only:
- tags
- master
- web
push_to_github:
before_script: []
variables:
GITHUB_MIRROR: https://$GITHUB_USERNAME:[email protected]/usnistgov/dval.git
stage: deploy
dependencies:
- docs
script: make publish_to_gitlab
when: manual
only:
- web