Skip to content
Snippets Groups Projects
.gitlab-ci.yml 1012 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:
    # - echo "[distutils]" >> ~/.pypirc
    # - echo "index-servers =" >> ~/.pypirc
    # - echo "    nexus" >> ~/.pypirc
    # - echo "" >> ~/.pypirc
    # - echo "[nexus]" >> ~/.pypirc
    # - echo "${PYPI_REPO}" >> ~/.pypirc
    # - echo "${PYPI_USER}" >> ~/.pypirc
    # - echo "${PYPI_PASSWORD}" >> ~/.pypirc
    - python3 -m build
    - python3 -m twine check dist/*
    - python3 -m twine upload --repository-url https://upload.pypi.org/legacy/ dist/*    
    # - python3 setup.py sdist bdist_wheel
    # - twine upload -r nexus dist/*.tar.gz
  only:
    - tags