From 024020f939e1a748fca84d5882e27bbd15b04e0c Mon Sep 17 00:00:00 2001 From: Patrik Dufresne Date: Fri, 8 Jun 2018 20:11:33 -0400 Subject: [PATCH] Add gitlab cicd --- .gitlab-ci.yml | 40 ++++++++++++++++++++++++++++++++++++++++ setup.py | 2 +- 2 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..05b2e38 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,40 @@ +image: ikus060/docker-debian-py2-py3:stretch + +stages: +- test +- publish + +# Upgrade python and install dependencies to avoid compiling from sources. +before_script: +- apt-get update && apt-get -qq install asciidoc + +test:py27: + stage: test + script: + # Register the plugin entry point and run the test + - python2 setup.py develop + - python2 setup.py nosetests + +test:py3: + stage: test + script: + # Register the plugin entry point and run the test + - python3 setup.py develop + - python3 setup.py nosetests + +publish_pypi: + stage: publish + only: + - tags + script: + - pip install wheel twine --upgrade + - python setup.py sdist bdist_wheel + - twine upload dist/* -u $PYPI_USR -p $PYPI_PWD + +github_push: + stage: publish + only: + - branches + script: + - git push --force https://${GITHUB_USR}:${GITHUB_PWD}@github.com/ikus060/lektor-python-markdown.git refs/remotes/origin/${CI_COMMIT_REF_NAME}:refs/heads/${CI_COMMIT_REF_NAME} + - git push https://${GITHUB_USR}:${GITHUB_PWD}@github.com/ikus060/lektor-python-markdown.git --tags diff --git a/setup.py b/setup.py index c77427f..6b97502 100644 --- a/setup.py +++ b/setup.py @@ -23,7 +23,7 @@ setup( long_description_content_type='text/markdown', name='lektor-asciidoc', py_modules=['lektor_asciidoc'], - tests_require=['pytest'], + tests_require=['lektor'], version='0.3', url='https://github.com/nixjdm/lektor-asciidoc', classifiers=[ -- GitLab