.gitlab-ci.yml 1.62 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
Jan Dinkelbach's avatar
Jan Dinkelbach committed
8
- generate
9
- deploy
10

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

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


documentation:
    stage: generate
    script:
24
        - cd documentation && ./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
fix CI    
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
            - .public
Philipp Reuber's avatar
Philipp Reuber committed
43
44
45
    dependencies:
        - documentation

46
47


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

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

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