.gitlab-ci.yml 1.51 KB
Newer Older
Erik Kalkoken's avatar
Erik Kalkoken committed
1
stages:
2
- pre-commit
Erik Kalkoken's avatar
Erik Kalkoken committed
3 4 5 6 7 8 9 10 11 12
- test
- deploy

before_script:
- apt-get update
- apt-get install redis-server -y
- redis-server --daemonize yes
- python -V
- pip install tox

13 14 15 16 17 18 19 20 21 22 23
pre-commit-check:
  stage: pre-commit
  image: python:3.6-buster
  variables:
    PRE_COMMIT_HOME: ${CI_PROJECT_DIR}/.cache/pre-commit
  cache:
    paths:
      - ${PRE_COMMIT_HOME}
  script:
    - pip install pre-commit
    - pre-commit run --all-files
Erik Kalkoken's avatar
Erik Kalkoken committed
24 25 26

.test-py36:
  stage: test
Erik Kalkoken's avatar
Erik Kalkoken committed
27
  image: python:3.6-buster
28

Erik Kalkoken's avatar
Erik Kalkoken committed
29 30 31
.test-py37:
  stage: test
  image: python:3.7-buster
32

Erik Kalkoken's avatar
Erik Kalkoken committed
33 34 35
.test-py38:
  stage: test
  image: python:3.8-buster
36

Erik Kalkoken's avatar
Erik Kalkoken committed
37 38 39 40 41
test-docs:
  extends: .test-py37
  script:
  - tox -e docs

Erik Kalkoken's avatar
Erik Kalkoken committed
42 43
test-36-django22:
  extends: .test-py36
44
  script:
45
  - tox -e py36-django22
Erik Kalkoken's avatar
Erik Kalkoken committed
46
  - bash <(curl -s https://codecov.io/bash)
Erik Kalkoken's avatar
Erik Kalkoken committed
47

Erik Kalkoken's avatar
Erik Kalkoken committed
48 49
test-36-django31:
  extends: .test-py36
50
  script:
Erik Kalkoken's avatar
Erik Kalkoken committed
51
  - tox -e py36-django31
Erik Kalkoken's avatar
Erik Kalkoken committed
52
  - bash <(curl -s https://codecov.io/bash)
53

Erik Kalkoken's avatar
Erik Kalkoken committed
54 55
test-37-django22:
  extends: .test-py37
56
  script:
Erik Kalkoken's avatar
Erik Kalkoken committed
57
  - tox -e py37-django22
Erik Kalkoken's avatar
Erik Kalkoken committed
58
  - bash <(curl -s https://codecov.io/bash)
59

Erik Kalkoken's avatar
Erik Kalkoken committed
60 61
test-37-django31:
  extends: .test-py37
62
  script:
Erik Kalkoken's avatar
Erik Kalkoken committed
63
  - tox -e py37-django31
Erik Kalkoken's avatar
Erik Kalkoken committed
64
  - bash <(curl -s https://codecov.io/bash)
Erik Kalkoken's avatar
Erik Kalkoken committed
65

Erik Kalkoken's avatar
Erik Kalkoken committed
66 67
test-38-django22:
  extends: .test-py38
68
  script:
Erik Kalkoken's avatar
Erik Kalkoken committed
69
  - tox -e py38-django22
Erik Kalkoken's avatar
Erik Kalkoken committed
70
  - bash <(curl -s https://codecov.io/bash)
Erik Kalkoken's avatar
Erik Kalkoken committed
71 72 73

test-38-django31:
  extends: .test-py38
74
  script:
75
  - tox -e py38-django31
Erik Kalkoken's avatar
Erik Kalkoken committed
76
  - bash <(curl -s https://codecov.io/bash)
Erik Kalkoken's avatar
Erik Kalkoken committed
77

Erik Kalkoken's avatar
Erik Kalkoken committed
78 79 80 81 82 83 84 85 86 87 88 89 90
deploy-pypi:
  stage: deploy
  image: python:3.7-buster

  before_script:
    - pip install twine

  script:
    - python setup.py sdist
    - twine upload dist/*

  only:
    - tags