Browse Source

setup gitlab-ci

https://code.grasp-open.com/grasp-internal/grasp-issue-board/issues/223
Fabian Peter Hammerle 4 years ago
parent
commit
8f15338280
2 changed files with 45 additions and 1 deletions
  1. 45 0
      .gitlab-ci.yml
  2. 0 1
      setup.py

+ 45 - 0
.gitlab-ci.yml

@@ -0,0 +1,45 @@
+image: docker-registry-default.apps.openshift.grasp-cloud.com/grasp-cloud/ubuntu-base:18.04
+
+stages:
+- test
+- pack
+- deploy
+
+variables:
+  LC_ALL: C.UTF-8
+  LANG: C.UTF-8
+
+before_script:
+- apt-get update
+- apt-get install --yes
+  python3
+- pip3 install pipenv
+- pipenv sync --dev
+
+linting:
+  stage: test
+  script:
+  - pipenv run pylint dlinfo
+
+tests:
+  stage: test
+  script:
+  - pipenv run pytest --cov dlinfo --cov-report term-missing
+
+pack:
+  stage: pack
+  script:
+  - python3 setup.py sdist
+  - python3 setup.py bdist_wheel
+  artifacts:
+    paths:
+    - dist/
+
+python-push:
+  stage: deploy
+  only: [tags]
+  script:
+  - apt-get install --yes twine
+  - twine upload dist/*
+
+# https://docs.gitlab.com/ee/ci/yaml/

+ 0 - 1
setup.py

@@ -10,7 +10,6 @@ setuptools.setup(
     tests_require=[
         'pytest',
         'pytest-cov',
-        'pylint',
         # https://github.com/PyCQA/pylint/issues/2694
         'pylint>=2.3.0',
     ],