From 56a8fdcb5dc02fd69658f51c054613c31ffddfea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20tom=20W=C3=B6rden?= <henrik@trineo.org> Date: Fri, 24 May 2019 15:45:47 +0200 Subject: [PATCH] ci file --- .gitlab-ci.yml | 103 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 103 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..abe134e --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,103 @@ +# +# ** header v3.0 +# This file is a part of the CaosDB Project. +# +# Copyright (C) 2018 Research Group Biomedical Physics, +# Max-Planck-Institute for Dynamics and Self-Organization Göttingen +# Copyright (C) 2019 Henrik tom Wörden +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see <https://www.gnu.org/licenses/>. +# +# ** end header +# +stages: + - before_script + - setup_docker + - setup + - code_style + - build + - test + +before_script: + - docker info + +######### +# Setup +######### + +# install formatters +setup:install_formatters:python2.7: + tags: [ py27 ] + stage: setup + script: + - pip2 install --upgrade pycodestyle --user + +setup:install_formatters:python3.4: + tags: [ py34 ] + stage: setup + script: + - pip3.4 install --upgrade pycodestyle --user + +############ +# code_style +############ + +code_style:pycodestyle:python2.7: + tags: [ py27 ] + stage: code_style + script: + - ~/.local/bin/pycodestyle --count ./ + +code_style:pycodestyle:python3.4: + tags: [ py34 ] + stage: code_style + script: + - ~/.local/bin/pycodestyle --count ./ + +######### +# Build +######### + +# install python client (python 2.7) +build:pycaosdb:python2.7: + tags: [ py27 ] + stage: build + script: + - python2.7 setup.py install --user + +# install python client (python 3.4) +build:pycaosdb:python3.4: + tags: [ py34 ] + stage: build + script: + - python3.4 setup.py install --user + +######## +# Test +######## + +# unit tests for pycaosdb +test:pycaosdb:py34: + tags: [ py34 ] + stage: test + script: + - touch ~/.pycaosdb.ini + - tox -r -e py34 + +test:pycaosdb:py27: + tags: [ py27 ] + stage: test + script: + - touch ~/.pycaosdb.ini + - tox -r -e py27 -- GitLab