Skip to content
Snippets Groups Projects
.gitlab-ci.yml 612 B
Newer Older
alexandre beelen's avatar
alexandre beelen committed

stages:
- test
alexandre beelen's avatar
alexandre beelen committed
- lint
- deploy
alexandre beelen's avatar
alexandre beelen committed

tests:
  stage: test
Alexandre Beelen's avatar
Alexandre Beelen committed
  script:
    - pip install tox
    - tox -e test
alexandre beelen's avatar
alexandre beelen committed

lint:
  stage: lint
Alexandre Beelen's avatar
Alexandre Beelen committed
  script: 
    - pip install tox
    - tox -e codestyle

pypi:
  stage: deploy
  before_script:
    - python3 -m pip install --upgrade twine
    - python3 -m pip install --upgrade build    
    - rm -rf dist
  variables:
    TWINE_USERNAME: $PYPI_USERNAME
    TWINE_PASSWORD: $PYPI_PASSWORD
  script:
    - python3 -m build
    - python3 -m twine check dist/*
    - python3 -m twine upload --repository-url https://upload.pypi.org/legacy/ dist/*    
  only:
    - tags