.gitlab-ci.yml 3.56 KB
Newer Older
1
2
3
4
5
image: python:latest

stages:
  - lint
  - tests
6
  - after-tests
7
8

lint_py:
9
10
11
  except:
    variables:
      - $TRIGGERED_FROM_OTHER_PROJECT
12
13
14
15
16
17
18
  stage: lint
  before_script:
    - pip install tox
  script:
    - tox -e flake8

lint_manifest:
19
20
21
  except:
    variables:
      - $TRIGGERED_FROM_OTHER_PROJECT
22
23
24
25
26
27
28
  stage: lint
  before_script:
    - pip install tox
  script:
    - tox -e check-manifest

lint_doc8:
29
30
31
  except:
    variables:
      - $TRIGGERED_FROM_OTHER_PROJECT
32
33
34
35
36
37
38
  stage: lint
  before_script:
    - pip install tox
  script:
    - tox -e doc8

lint_doc:
39
40
41
  except:
    variables:
      - $TRIGGERED_FROM_OTHER_PROJECT
42
43
44
45
46
47
48
49
  stage: lint
  before_script:
    - pip install tox
  script:
    - tox -e doc
  allow_failure: true  # XXX fix me

py3_server:
50
51
52
  except:
    variables:
      - $TRIGGERED_FROM_OTHER_PROJECT
53
54
  stage: tests
  image: r.intra.logilab.fr/jenkins/jnlp:buster
55
56
57
  before_script:
    - sudo apt update
    - sudo DEBIAN_FRONTEND=noninteractive APT_LISTCHANGES_FRONTEND=none apt-get install -y --assume-yes -qq -o=Dpkg::Use-Pty=0 slapd ldap-utils
58
59
  script:
    - tox -e py3-server
60
61
62
  artifacts:
    paths:
      - /builds/cubicweb/cubicweb/server.html
63
      - /builds/cubicweb/cubicweb/py3-server-deprecated-warnings.json
64
65

py3_web:
66
67
68
  except:
    variables:
      - $TRIGGERED_FROM_OTHER_PROJECT
69
70
  stage: tests
  image: r.intra.logilab.fr/jenkins/jnlp:buster
71
72
  before_script:
    - sudo apt update && sudo apt install -y firefox-esr
73
74
  script:
    - tox -e py3-web
75
76
77
  artifacts:
    paths:
      - /builds/cubicweb/cubicweb/web.html
78
      - /builds/cubicweb/cubicweb/py3-web-deprecated-warnings.json
79
80

py3_misc:
81
82
83
  except:
    variables:
      - $TRIGGERED_FROM_OTHER_PROJECT
84
85
  stage: tests
  image: r.intra.logilab.fr/jenkins/jnlp:buster
86
87
  before_script:
    - sudo apt update && sudo apt install -y firefox-esr
88
89
  script:
    - tox -e py3-misc
90
91
92
  artifacts:
    paths:
      - /builds/cubicweb/cubicweb/misc.html
93
      - /builds/cubicweb/cubicweb/py3-misc-deprecated-warnings.json
Laurent Peuch's avatar
Laurent Peuch committed
94

95
py3-from-forge-server:
Laurent Peuch's avatar
Laurent Peuch committed
96
97
  stage: tests
  image: r.intra.logilab.fr/jenkins/jnlp:buster
98
  allow_failure: true
99
100
101
  before_script:
    - sudo apt update
    - sudo DEBIAN_FRONTEND=noninteractive APT_LISTCHANGES_FRONTEND=none apt-get install -y --assume-yes -qq -o=Dpkg::Use-Pty=0 slapd ldap-utils
Laurent Peuch's avatar
Laurent Peuch committed
102
  script:
103
    - tox -e py3-from-forge-server
104
105
106
  artifacts:
    paths:
      - /builds/cubicweb/cubicweb/from-forge-server.html
107
      - /builds/cubicweb/cubicweb/py3-from-forge-server-deprecated-warnings.json
108
109
110
111
112

py3-from-forge-web:
  stage: tests
  image: r.intra.logilab.fr/jenkins/jnlp:buster
  allow_failure: true
113
114
  before_script:
    - sudo apt update && sudo apt install -y firefox-esr
115
116
  script:
    - tox -e py3-from-forge-web
117
118
119
  artifacts:
    paths:
      - /builds/cubicweb/cubicweb/from-forge-web.html
120
      - /builds/cubicweb/cubicweb/py3-from-forge-web-deprecated-warnings.json
121
122
123
124
125

py3-from-forge-misc:
  stage: tests
  image: r.intra.logilab.fr/jenkins/jnlp:buster
  allow_failure: true
126
127
  before_script:
    - sudo apt update && sudo apt install -y firefox-esr
128
129
  script:
    - tox -e py3-from-forge-misc
130
131
132
  artifacts:
    paths:
      - /builds/cubicweb/cubicweb/from-forge-misc.html
133
      - /builds/cubicweb/cubicweb/py3-from-forge-misc-deprecated-warnings.json
134
135

trigger-readthedocs:
136
137
138
  only:
    refs:
      - branch/default
139
140
141
  except:
    variables:
      - $TRIGGERED_FROM_OTHER_PROJECT
142
143
  stage: after-tests
  script:
144
145
  # regarding the " everywhere when there is a '%': yaml is extremly weird when % are involved
  - curl -X POST -d "token=${READTHEDOCS_TOKEN}" https://readthedocs.org/api/v2/webhook/cubicweb/33537/ -w "\nhttp code:"\ "%{http_code}\n" -f