.gitlab-ci.yml 489 Bytes
Newer Older
1 2 3
image: python:3.6-alpine

stages:
Dan Keder's avatar
Dan Keder committed
4
  - test
5 6
  - deploy

Dan Keder's avatar
Dan Keder committed
7 8 9 10
black:
  stage: test
  image: python:alpine
  script:
Dan Keder's avatar
Dan Keder committed
11 12
    - apk update
    - apk add gcc musl-dev
Dan Keder's avatar
Dan Keder committed
13 14
    - pip install black
    - black --check --line-length 120 .
15
  allow_failure: true
16 17 18 19 20 21 22

deploy_production:
  stage: deploy
  variables:
    TWINE_USERNAME: $PRODUCTION_USERNAME
    TWINE_PASSWORD: $PRODUCTION_PASSWORD
  script:
Dan Keder's avatar
Dan Keder committed
23 24
    - pip install twine
    - python setup.py sdist bdist_wheel
25 26
    - twine upload dist/*
  only:
Dan Keder's avatar
Dan Keder committed
27
    - tags