.gitlab-ci.yml 1.59 KB
Newer Older
Jan Dinkelbach's avatar
Jan Dinkelbach committed
1
2
variables:
    DOCKER_TAG_DEV: ${CI_COMMIT_REF_NAME}
Jan Dinkelbach's avatar
Jan Dinkelbach committed
3
    DOCKER_IMAGE_DEV: cimpy
4

Jan Dinkelbach's avatar
Jan Dinkelbach committed
5
6
stages:
- prepare
Philipp Reuber's avatar
Philipp Reuber committed
7
- test
Philipp Reuber's avatar
Philipp Reuber committed
8
- generate
9
- deploy
10

Jan Dinkelbach's avatar
Jan Dinkelbach committed
11
12
13
14
15
16
17
18
19
20

docker:
    stage: prepare
    script:
        - docker build -t ${DOCKER_IMAGE_DEV}:${DOCKER_TAG_DEV} .
    tags:
        - shell
        - linux


Philipp Reuber's avatar
Philipp Reuber committed
21
22
documentation:
    stage: generate
Jan Dinkelbach's avatar
Jan Dinkelbach committed
23
    script:
Jan Dinkelbach's avatar
Jan Dinkelbach committed
24
        - cd scripts && ./docu.sh
Jan Dinkelbach's avatar
Jan Dinkelbach committed
25
26
27
    image: ${DOCKER_IMAGE_DEV}:${DOCKER_TAG_DEV}
    artifacts:
        paths:
Jan Dinkelbach's avatar
Jan Dinkelbach committed
28
            - documentation
Jan Dinkelbach's avatar
Jan Dinkelbach committed
29
30
    tags:
        - docker
Philipp Reuber's avatar
Philipp Reuber committed
31

32

Philipp Reuber's avatar
Philipp Reuber committed
33
pages:
Philipp Reuber's avatar
Philipp Reuber committed
34
35
36
    stage: deploy
    script:
        - mkdir .public
Philipp Reuber's avatar
Philipp Reuber committed
37
        - cp -r documentation/_build/html/. .public
Philipp Reuber's avatar
Philipp Reuber committed
38
39
40
41
        - mv .public public
    artifacts:
        paths:
            - public
Philipp Reuber's avatar
Philipp Reuber committed
42
43
44
    dependencies:
        - documentation

45
46


47
test:import:
48
    stage: test
49
50
51
    variables:
        PYTHONPATH: "build/Source/Python:Source/Python"
    script:
Philipp Reuber's avatar
fix yml    
Philipp Reuber committed
52
        - python3 setup.py develop
Philipp Reuber's avatar
fix yml    
Philipp Reuber committed
53
        - cd tests && pytest -v test_import.py
54
55
56
57
    image: ${DOCKER_IMAGE_DEV}:${DOCKER_TAG_DEV}
    tags:
        - docker

Jan Dinkelbach's avatar
Jan Dinkelbach committed
58
test:export-against-imported-files:
59
    stage: test
60
61
62
    variables:
        PYTHONPATH: "build/Source/Python:Source/Python"
    script:
Philipp Reuber's avatar
fix yml    
Philipp Reuber committed
63
        - python3 setup.py develop
Philipp Reuber's avatar
fix yml    
Philipp Reuber committed
64
        - cd tests && pytest -v test_export_with_imported_files.py
65
66
67
68
    image: ${DOCKER_IMAGE_DEV}:${DOCKER_TAG_DEV}
    tags:
        - docker

Jan Dinkelbach's avatar
Jan Dinkelbach committed
69
test:export-against-exported-files:
70
    stage: test
Philipp Reuber's avatar
Philipp Reuber committed
71
72
73
    variables:
        PYTHONPATH: "build/Source/Python:Source/Python"
    script:
Philipp Reuber's avatar
fix yml    
Philipp Reuber committed
74
        - python3 setup.py develop
Philipp Reuber's avatar
fix yml    
Philipp Reuber committed
75
        - cd tests && pytest -v test_export_with_exported_files.py
Philipp Reuber's avatar
Philipp Reuber committed
76
77
78
    image: ${DOCKER_IMAGE_DEV}:${DOCKER_TAG_DEV}
    tags:
        - docker