-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
65 lines (60 loc) · 1.31 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
variables:
GIT_STRATEGY: clone
stages:
- build
- test
- deploy
.virtenv: &virtualenv
- python -m venv virtualenv
- source virtualenv/bin/activate
build:
# This stage only tests if the installation is possible.
# The evironment created herein will be discared and re-created in the test stage.
stage: build
tags:
- panelaero
script:
- *virtualenv
- pip install .
test:
stage: test
timeout: 3 hours
coverage: '/^TOTAL.+?(\d+\%)$/'
tags:
- panelaero
dependencies:
- build
script:
- *virtualenv
# Install with -e (in editable mode) to allow the tracking of the test coverage
- pip install -e .[test]
- which python
- which pytest
# Run the actual testing
- pytest -v --basetemp=./tmp --cov-report xml:coverage.xml --cov=panelaero --junitxml=testresult.xml
- coverage xml -o coverage.xml
- coverage report
- coverage html --directory ./coverage
artifacts:
when: always
paths:
- coverage.xml
- testresult.xml
- coverage
reports:
coverage_report:
coverage_format: cobertura
path: coverage.xml
junit: testresult.xml
pages:
stage: deploy
tags:
- panelaero
dependencies:
- test
script:
- mkdir public
- mv coverage public/coverage
artifacts:
paths:
- public