.gitlab-ci.yml 781 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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 --doctest-modules --cov dlinfo --cov-report term-missing
  23. pack:
  24. stage: pack
  25. script:
  26. - python3 setup.py sdist
  27. - apt-get install --yes python3-wheel
  28. - python3 setup.py bdist_wheel
  29. artifacts:
  30. paths:
  31. - dist/
  32. python-push:
  33. stage: deploy
  34. only: [tags]
  35. script:
  36. - apt-get install --yes twine
  37. - twine upload dist/*
  38. # https://docs.gitlab.com/ee/ci/yaml/