.gitlab-ci.yml 2.81 KB
Newer Older
1
2
image: python

3
stages:
4
  - lint
5
6
7
  - tests
  - after-tests

8
9
10
11
before_script:
  - pip install tox

py3:
12
  stage: tests
13
  script: tox -e py3
14
15
16
  artifacts:
    paths:
      - py3-deprecated-warnings.json
17

18
19
20
21
flake8:
  stage: tests
  script: tox -e flake8

22
check-manifest:
23
  stage: tests
24
25
26
  script: tox -e check-manifest

black:
27
  stage: tests
28
29
30
  script: tox -e black

mypy:
31
  stage: tests
32
  script: tox -e mypy
33

34
trigger-cubicweb-pipeline:
35
  stage: after-tests
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
  except:
    variables:
      - $TRIGGERED_FROM_OTHER_PROJECT && $TRIGGERED_FROM_OTHER_PROJECT != "logilab-common"
  variables:
    TRIGGERED_FROM_OTHER_PROJECT: "logilab-common"
  trigger:
    project: cubicweb/cubicweb
    branch: branch/default
    strategy: depend

trigger-yams-pipeline:
  stage: after-tests
  except:
    variables:
      - $TRIGGERED_FROM_OTHER_PROJECT && $TRIGGERED_FROM_OTHER_PROJECT != "logilab-common"
  variables:
    TRIGGERED_FROM_OTHER_PROJECT: "logilab-common"
  trigger:
    project: open-source/yams
    branch: branch/default
    strategy: depend

trigger-rql-pipeline:
  stage: after-tests
  except:
    variables:
      - $TRIGGERED_FROM_OTHER_PROJECT && $TRIGGERED_FROM_OTHER_PROJECT != "logilab-common"
  variables:
    TRIGGERED_FROM_OTHER_PROJECT: "logilab-common"
  trigger:
    project: open-source/CubicWeb/RQL
    branch: branch/default
    strategy: depend

trigger-logilab-database-pipeline:
  stage: after-tests
  except:
    variables:
      - $TRIGGERED_FROM_OTHER_PROJECT && $TRIGGERED_FROM_OTHER_PROJECT != "logilab-common"
  variables:
    TRIGGERED_FROM_OTHER_PROJECT: "logilab-common"
  trigger:
    project: open-source/logilab-database
    branch: branch/default
    strategy: depend

trigger-logilab-constraint-pipeline:
  stage: after-tests
  except:
    variables:
      - $TRIGGERED_FROM_OTHER_PROJECT && $TRIGGERED_FROM_OTHER_PROJECT != "logilab-common"
  variables:
    TRIGGERED_FROM_OTHER_PROJECT: "logilab-common"
  trigger:
    project: open-source/logilab-constraint
    branch: branch/default
    strategy: depend

trigger-logilab-mtconverter-pipeline:
  stage: after-tests
  except:
    variables:
      - $TRIGGERED_FROM_OTHER_PROJECT && $TRIGGERED_FROM_OTHER_PROJECT != "logilab-common"
  variables:
    TRIGGERED_FROM_OTHER_PROJECT: "logilab-common"
  trigger:
    project: open-source/logilab-mtconverter
    branch: branch/default
    strategy: depend
105
106

trigger-readthedocs:
107
108
109
  only:
    refs:
      - branch/default
110
111
  stage: after-tests
  script:
112
113
114
115
116
117
118
119
120
121
122
123
124
    # 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/logilab-common/89595/ -w "\nhttp code:"\ "%{http_code}\n" -f

yamllint:
  stage: lint
  rules:
    - changes:
        - "**/*.yaml"
        - "*.yaml"
        - "**/*.yml"
        - "*.yml"
  script:
    - tox -e yamllint