.gitlab-ci.yml 1.52 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
- documentation
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
34
pages:
  stage: deploy
35
36
  script:
  - mkdir .public
Philipp Reuber's avatar
Philipp Reuber committed
37
  - cp -r documentation/_build/html .public
38
39
40
41
42
43
  - mv .public public
  artifacts:
    paths:
    - public


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

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

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