File: .gitlab-ci.yml

package info (click to toggle)
python-processview 1.4.1-3
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 1,216 kB
  • sloc: python: 1,533; makefile: 6
file content (97 lines) | stat: -rw-r--r-- 2,021 bytes parent folder | download | duplicates (2)
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97

stages:
  - style
  - build
  - test
  - deploy

variables:
  QT_QPA_PLATFORM: offscreen


# style
check_style:
  stage: style
  image: gitlab-registry.esrf.fr/dau/ci/pyci/python_3.9_glx:latest
  before_script:
    - pip install black
  script:
    # run black
    - LC_ALL=C.UTF-8 black --check --safe .


doc:
  stage: build
  image: gitlab-registry.esrf.fr/dau/ci/pyci/python_3.8_doc:latest
  tags:
    - linux
  before_script:
    - arch
    - which python
    - python --version
    - python -m pip install pip --upgrade
    - python -m pip install setuptools --upgrade
    - python -m pip install numpy --upgrade
    - python -m pip install Sphinx
    - python -m pip install nbsphinx
    - rm -rf artifacts
    - mkdir artifacts
    - python -m pip install .[doc]
  script:
    - sphinx-build doc html
    - mv html artifacts/doc
  artifacts:
    paths:
      - artifacts/doc/
    when: on_success
    expire_in: 2h
  only:
    - master


.pytest:
  stage: test
  before_script:
    - arch
    - python --version
    - python -m pip install pip --upgrade
    - python -m pip install setuptools --upgrade
    - python -m pip install numpy --upgrade
    - python -m pip install .[full]
    - python -m pip install pytest-cov
    - rm -rf artifacts
    - mkdir artifacts
  script:
    - python -m pytest --basetemp=pytest_test_dir --cov-report term-missing --cov-report html:code_coverage_infos --cov=./ processview
    - mv code_coverage_infos artifacts/code_coverage


test-3.9:
  extends: .pytest
  image: gitlab-registry.esrf.fr/dau/ci/pyci/python_3.9_glx:latest
  coverage: '/(?i)total.*? (100(?:\.0+)?\%|[1-9]?\d(?:\.\d+)?\%)$/'
  artifacts:
    paths:
      - artifacts/code_coverage/
    expire_in: 1h



# deploy
pages:
  stage: deploy
  tags:
    - linux
  image: gitlab-registry.esrf.fr/dau/ci/pyci/python_3.8_doc:latest
  script:
    - rm -rf public
    # doc
    - mv artifacts/doc public
  after_script:
    - ls -Rl public
  artifacts:
    paths:
      - public
    expire_in: 2h
  only:
    - master