.gitlab-ci.yml 1.72 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
31
32
33
34
    cache:
        key: secret-cimpy
        paths:
            - documentation
Philipp Reuber's avatar
Philipp Reuber committed
35

36

Philipp Reuber's avatar
Philipp Reuber committed
37
pages:
Philipp Reuber's avatar
Philipp Reuber committed
38
39
40
    stage: deploy
    script:
        - mkdir .public
Philipp Reuber's avatar
Philipp Reuber committed
41
        - cp -r documentation/_build/html/. .public
Philipp Reuber's avatar
Philipp Reuber committed
42
43
44
45
        - mv .public public
    artifacts:
        paths:
            - public
Philipp Reuber's avatar
Philipp Reuber committed
46
            - .public
Philipp Reuber's avatar
Philipp Reuber committed
47
48
    dependencies:
        - documentation
49
50
    only:
        - master
Philipp Reuber's avatar
Philipp Reuber committed
51

52
53


54
test:import:
55
    stage: test
56
57
58
    variables:
        PYTHONPATH: "build/Source/Python:Source/Python"
    script:
Philipp Reuber's avatar
fix yml    
Philipp Reuber committed
59
        - python3 setup.py develop
Philipp Reuber's avatar
fix yml    
Philipp Reuber committed
60
        - cd tests && pytest -v test_import.py
61
62
63
64
    image: ${DOCKER_IMAGE_DEV}:${DOCKER_TAG_DEV}
    tags:
        - docker

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

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