File: .gitlab-ci.yml

package info (click to toggle)
lavacli 0.9.8-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 604 kB
  • sloc: python: 9,619; sh: 105; makefile: 31
file content (135 lines) | stat: -rw-r--r-- 2,711 bytes parent folder | download
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
stages:
- test
- analyze
- build
- deploy

########
# Test #
########
.test: &test
  stage: test
  tags: [amd64]
  before_script:
  - apt-get update -qq
  - apt-get install --no-install-recommends -y python3 python3-jinja2 python3-pytest python3-requests python3-yaml python3-zmq
  script:
  - py.test-3 -v --junitxml=lavacli.xml tests
  artifacts:
    reports:
      junit:
      - lavacli.xml

test-debian-8:
  <<: *test
  image: debian:8
test-debian-9:
  <<: *test
  image: debian:9
test-debian-10:
  <<: *test
  image: debian:10
test-debian-11:
  <<: *test
  image: debian:bullseye
test-ubuntu-18.04:
  <<: *test
  image: ubuntu:18.04
test-ubuntu-18.10:
  <<: *test
  image: ubuntu:18.10
test-ubuntu-19.04:
  <<: *test
  image: ubuntu:19.04

###########
# Analyze #
###########
codestyle:
  stage: analyze
  image: debian:9
  tags: [amd64]
  before_script:
  - apt-get update -qq
  - apt-get install --no-install-recommends -y pycodestyle
  script:
  - pycodestyle --ignore=E501,W503 .

black:
  stage: analyze
  image: debian:buster
  tags: [amd64]
  before_script:
  - apt-get update -qq
  - apt-get install --no-install-recommends -y python3-pip python3-setuptools
  - pip3 install black
  script:
  - LC_ALL=C.UTF-8 LANG=C.UTF-8 black --check .

coverage:
  stage: analyze
  image: debian:buster
  tags: [amd64]
  before_script:
  - apt-get update -qq
  - apt-get install --no-install-recommends -y python3 python3-jinja2 python3-pytest python3-pytest-cov python3-requests python3-yaml python3-zmq
  coverage: '/^TOTAL.+ (\d+\.\d+)%$/'
  script:
  - py.test-3 -v --cov --cov-report=term --cov-report=html tests
  artifacts:
    paths:
    - htmlcov

# static analysis with bandit
include:
  template: SAST.gitlab-ci.yml
sast:
  tags: [amd64-dind]
  stage: analyze
  variables:
    DOCKER_DRIVER: overlay2
    SAST_DEFAULT_ANALYZERS: "bandit"

#########
# Build #
#########
sdist:
  stage: build
  image: debian:9
  tags: [amd64]
  before_script:
  - apt-get update -qq
  - apt-get install --no-install-recommends -y python3 python3-pytest-runner python3-setuptools
  script:
  - python3 setup.py sdist

doc:
  stage: build
  image: debian:9
  tags: [amd64]
  before_script:
  - apt-get update -qq
  - apt-get install --no-install-recommends -y make python3 python3-pytest-runner python3-setuptools python3-sphinx
  script:
  - make -C doc html
  artifacts:
    paths:
    - doc/_build/html

##########
# Deploy #
##########
doc-deploy:
  stage: deploy
  tags: [deploy]
  only:
    refs:
    - tags
  dependencies:
  - doc
  script:
  - mkdir -p ${HOME}/docs/lavacli
  - rsync -av --delete doc/_build/html ${HOME}/docs/lavacli/
  environment:
    name: doc
    url: https://docs.lavasoftware.org/lavacli