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

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

8 9 10
before_script:
  - pip install tox
py3:
11 12 13
  except:
    variables:
      - $TRIGGERED_FROM_OTHER_PROJECT
14 15 16
  before_script:
    - apt-get update
    - apt-get install texlive-latex-recommended -y
Nsukami Patrick's avatar
Nsukami Patrick committed
17
    - apt-get install xpdf -y
18
    - pip install tox
19
  stage: tests
20
  script: tox -e py3
21 22 23
  artifacts:
    paths:
      - py3-deprecated-warnings.json
24

25
py3-from-forge:
26 27 28
  before_script:
    - apt-get update
    - apt-get install texlive-latex-recommended -y
29
    - apt-get install xpdf -y
30
    - pip install tox
31
  stage: tests
Laurent Peuch's avatar
Laurent Peuch committed
32
  script: tox -e py3-from-forge
33 34 35
  artifacts:
    paths:
      - py3-deprecated-warnings.json
36

37
check-manifest:
38 39 40
  except:
    variables:
      - $TRIGGERED_FROM_OTHER_PROJECT
41
  stage: tests
42
  script: tox -e check-manifest
43

44
black:
45 46 47
  except:
    variables:
      - $TRIGGERED_FROM_OTHER_PROJECT
48 49 50
  stage: tests
  script: tox -e black

51
flake8:
52 53 54
  except:
    variables:
      - $TRIGGERED_FROM_OTHER_PROJECT
55 56 57
  stage: tests
  script: tox -e flake8

58
mypy:
59 60 61
  except:
    variables:
      - $TRIGGERED_FROM_OTHER_PROJECT
62
  stage: tests
Nsukami Patrick's avatar
Nsukami Patrick committed
63
  script: tox -e mypy
64

65 66
trigger-cubicweb-pipeline:
  stage: after-tests
67 68
  except:
    variables:
69 70 71 72 73 74 75
      - $TRIGGERED_FROM_OTHER_PROJECT && $TRIGGERED_FROM_OTHER_PROJECT != "logilab-constraint"
  variables:
    TRIGGERED_FROM_OTHER_PROJECT: "logilab-constraint"
  trigger:
    project: cubicweb/cubicweb
    branch: branch/default
    strategy: depend
76 77 78 79 80 81 82 83 84 85 86

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