Martin Blanchard pushed to branch mablanch/51-user-facing-docs at BuildGrid / buildgrid
Commits:
-
7eb551a3
by Martin Blanchard at 2018-08-15T08:14:32Z
1 changed file:
Changes:
| ... | ... | @@ -9,16 +9,20 @@ stages: |
| 9 | 9 |
- post
|
| 10 | 10 |
|
| 11 | 11 |
before_script:
|
| 12 |
- - pip3 install setuptools
|
|
| 13 |
- - export PATH=~/.local/bin:${PATH}
|
|
| 14 |
- - pip3 install --user -e .
|
|
| 12 |
+ - python3 -m venv env
|
|
| 13 |
+ - env/bin/python install --upgrade setuptools pip
|
|
| 14 |
+ - env/bin/python -m pip install --editable .
|
|
| 15 | 15 |
|
| 16 |
+ |
|
| 17 |
+#
|
|
| 18 |
+# Test stage:
|
|
| 16 | 19 |
.tests-template: &linux-tests
|
| 17 | 20 |
stage: test
|
| 18 | 21 |
variables:
|
| 19 | 22 |
PYTEST_ADDOPTS: "--color=yes"
|
| 20 | 23 |
script:
|
| 21 |
- - python3 setup.py test
|
|
| 24 |
+ - env/bin/python -m pip install --editable ".[tests]"
|
|
| 25 |
+ - env/bin/python setup.py test
|
|
| 22 | 26 |
- mkdir -p coverage/
|
| 23 | 27 |
- cp .coverage.* coverage/coverage."${CI_JOB_NAME}"
|
| 24 | 28 |
artifacts:
|
| ... | ... | @@ -40,7 +44,19 @@ run-dummy-job-debian: |
| 40 | 44 |
image: buildstream/buildstream-debian
|
| 41 | 45 |
<<: *dummy-job
|
| 42 | 46 |
|
| 47 |
+build-docs:
|
|
| 48 |
+ stage: test
|
|
| 49 |
+ script:
|
|
| 50 |
+ - env/bin/python -m pip install --editable ".[docs]"
|
|
| 51 |
+ - env/bin/python setup.py build_sphinx
|
|
| 52 |
+ - cp build/sphinx/html public
|
|
| 53 |
+ artifacts:
|
|
| 54 |
+ paths:
|
|
| 55 |
+ - public/
|
|
| 56 |
+ |
|
| 43 | 57 |
|
| 58 |
+#
|
|
| 59 |
+# Post stage:
|
|
| 44 | 60 |
coverage:
|
| 45 | 61 |
stage: post
|
| 46 | 62 |
coverage: '/TOTAL +\d+ +\d+ +(\d+\.\d+)%/'
|
| ... | ... | @@ -55,14 +71,15 @@ coverage: |
| 55 | 71 |
dependencies:
|
| 56 | 72 |
- tests-debian-stretch
|
| 57 | 73 |
|
| 58 |
-# Deploy, only for merges which land on master branch.
|
|
| 74 |
+ |
|
| 59 | 75 |
#
|
| 76 |
+# Deploy stage (master only):
|
|
| 60 | 77 |
pages:
|
| 61 | 78 |
stage: post
|
| 62 | 79 |
dependencies:
|
| 63 |
- - tests-debian-stretch
|
|
| 80 |
+ - docs
|
|
| 64 | 81 |
script:
|
| 65 |
- - mv coverage/ public/
|
|
| 82 |
+ - find public/
|
|
| 66 | 83 |
artifacts:
|
| 67 | 84 |
paths:
|
| 68 | 85 |
- public/
|
