.gitlab-ci.yml 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. stages:
  2. - test
  3. - docs
  4. - build
  5. - deploy
  6. epydoc:
  7. stage: docs
  8. only:
  9. - master
  10. - tags
  11. artifacts:
  12. paths:
  13. - html/
  14. tags:
  15. - python2
  16. - linux
  17. script:
  18. - wget https://git.mk2es.com.au/snippets/9/raw -O doc-style.css -q
  19. - >-
  20. epydoc --no-sourcecode --no-frames --output html --simple-term -vv
  21. --inheritance grouped --css doc-style.css
  22. --name 'Async Events' avent
  23. pypi:
  24. stage: build
  25. only:
  26. - master
  27. - tags
  28. artifacts:
  29. paths:
  30. - dist/
  31. dependencies:
  32. - epydoc
  33. tags:
  34. - python3
  35. - linux
  36. script:
  37. - python3 setup.py bdist_wheel --universal
  38. lint:py2:
  39. stage: test
  40. tags:
  41. - python2
  42. - linux
  43. script:
  44. - wget https://git.mk2es.com.au/snippets/8/raw -O mk2pylint.cfg -q
  45. - python2 -m pylint --rcfile=mk2pylint.cfg avent --reports=no --ignore=fluid.py,strict.py || [[ $(($? & 3)) == 0 ]]
  46. lint:py3:
  47. stage: test
  48. tags:
  49. - python3
  50. - linux
  51. script:
  52. - wget https://git.mk2es.com.au/snippets/8/raw -O mk2pylint.cfg -q
  53. - python3 -m pylint --rcfile=mk2pylint.cfg avent --reports=no --ignore=compat || [[ $(($? & 3)) == 0 ]]
  54. units:
  55. stage: test
  56. tags:
  57. - python3
  58. - linux
  59. script:
  60. - python3 -Bm coverage run --source=avent --omit avent/compat/*.py -m unittest tests/*.py
  61. - python3 -Bm coverage report -m
  62. deploy:
  63. stage: deploy
  64. allow_failure: true
  65. dependencies:
  66. - epydoc
  67. - pypi
  68. only:
  69. - master
  70. - tags
  71. tags:
  72. - linux
  73. - mk2-docs
  74. script:
  75. - '[ -e /srv/pypi/packages/avent ] || mkdir /srv/pypi/packages/avent'
  76. - '[ -e /srv/api/avent ] || mkdir /srv/api/avent'
  77. - cp -r html/* /srv/api/avent
  78. - cp dist/*.whl /srv/pypi/packages/avent