.gitlab-ci.yml 723 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. image: docker-registry-default.apps.openshift.grasp-cloud.com/grasp-cloud/ubuntu-base:18.04
  2. stages:
  3. - test
  4. - pack
  5. - deploy
  6. variables:
  7. LC_ALL: C.UTF-8
  8. LANG: C.UTF-8
  9. before_script:
  10. - apt-get update
  11. - apt-get install --yes
  12. python3
  13. - pip3 install pipenv
  14. - pipenv sync --dev
  15. linting:
  16. stage: test
  17. script:
  18. - pipenv run pylint dlinfo tests/*.py
  19. tests:
  20. stage: test
  21. script:
  22. - pipenv run pytest --cov dlinfo --cov-report term-missing
  23. pack:
  24. stage: pack
  25. script:
  26. - python3 setup.py sdist
  27. - python3 setup.py bdist_wheel
  28. artifacts:
  29. paths:
  30. - dist/
  31. python-push:
  32. stage: deploy
  33. only: [tags]
  34. script:
  35. - apt-get install --yes twine
  36. - twine upload dist/*
  37. # https://docs.gitlab.com/ee/ci/yaml/