.gitlab-ci.yml 3.12 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
64

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

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

92
py3-from-forge-server:
Laurent Peuch's avatar
Laurent Peuch committed
93
94
  stage: tests
  image: r.intra.logilab.fr/jenkins/jnlp:buster
95
  allow_failure: true
96
97
98
  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
99
  script:
100
    - tox -e py3-from-forge-server
101
102
103
  artifacts:
    paths:
      - /builds/cubicweb/cubicweb/from-forge-server.html
104
105
106
107
108

py3-from-forge-web:
  stage: tests
  image: r.intra.logilab.fr/jenkins/jnlp:buster
  allow_failure: true
109
110
  before_script:
    - sudo apt update && sudo apt install -y firefox-esr
111
112
  script:
    - tox -e py3-from-forge-web
113
114
115
  artifacts:
    paths:
      - /builds/cubicweb/cubicweb/from-forge-web.html
116
117
118
119
120

py3-from-forge-misc:
  stage: tests
  image: r.intra.logilab.fr/jenkins/jnlp:buster
  allow_failure: true
121
122
  before_script:
    - sudo apt update && sudo apt install -y firefox-esr
123
124
  script:
    - tox -e py3-from-forge-misc
125
126
127
  artifacts:
    paths:
      - /builds/cubicweb/cubicweb/from-forge-misc.html
128
129

trigger-readthedocs:
130
131
132
  only:
    refs:
      - branch/default
133
134
135
  except:
    variables:
      - $TRIGGERED_FROM_OTHER_PROJECT
136
137
  stage: after-tests
  script:
138
139
  # 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