.gitlab-ci.yml 2.77 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
55
56
  stage: tests
  image: r.intra.logilab.fr/jenkins/jnlp:buster
  script:
    - tox -e py3-server
57
58
59
  artifacts:
    paths:
      - /builds/cubicweb/cubicweb/server.html
60
61

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

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

89
py3-from-forge-server:
Laurent Peuch's avatar
Laurent Peuch committed
90
91
  stage: tests
  image: r.intra.logilab.fr/jenkins/jnlp:buster
92
  allow_failure: true
Laurent Peuch's avatar
Laurent Peuch committed
93
  script:
94
    - tox -e py3-from-forge-server
95
96
97
  artifacts:
    paths:
      - /builds/cubicweb/cubicweb/from-forge-server.html
98
99
100
101
102

py3-from-forge-web:
  stage: tests
  image: r.intra.logilab.fr/jenkins/jnlp:buster
  allow_failure: true
103
104
  before_script:
    - sudo apt update && sudo apt install -y firefox-esr
105
106
  script:
    - tox -e py3-from-forge-web
107
108
109
  artifacts:
    paths:
      - /builds/cubicweb/cubicweb/from-forge-web.html
110
111
112
113
114

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

trigger-readthedocs:
124
125
126
  only:
    refs:
      - branch/default
127
128
129
  except:
    variables:
      - $TRIGGERED_FROM_OTHER_PROJECT
130
131
  stage: after-tests
  script:
132
133
  # 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