-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml.bak
45 lines (38 loc) · 1.17 KB
/
.gitlab-ci.yml.bak
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
image: python:latest
variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
before_script:
- python -V
- pip install virtualenv
- virtualenv venv
- source venv/bin/activate
- export PYTHONPATH=$(pwd)/..:$PYTHONPATH
- export instal_dir=$(pwd)
cache:
paths:
- .cache/pip
- venv/
stages:
- build
- test
installation:
stage: build
script:
- python -m pip install matplotlib numpy scipy --upgrade
coverage:
stage: test
script:
- python -m pip install pytest pytest-cov --upgrade
- cd $instal_dir/tests
- pytest --cov-report term --cov=$instal_dir/{module/,data/} *.py
coverage: '/^TOTAL\s+\d+\s+\d+\s+(\d+\%)$/'
prod:
stage: test
script:
- apt-get -qq update && apt-get -qq install -y texlive texlive-latex-extra texlive-science texlive-extra-utils
- for file in $(find $instal_dir/examples/ -type f -iname ltLaTeXpyplot_example.py) ; do echo $file ; cd $(dirname $file) ; ./ltLaTeXpyplot_example.py ; done
- for file in $(find $instal_dir/examples/ -type f -iname matplotlib_example.py) ; do echo $file ; cd $(dirname $file) ; python matplotlib_example.py ; done
artifacts:
paths:
- examples/
expire_in: 10 weeks