From 89d6a9552cb729592d3e3673f1ad9a51258317f8 Mon Sep 17 00:00:00 2001 From: Lubomir Prda Date: Tue, 28 Nov 2017 15:16:58 +0100 Subject: [PATCH 1/2] Enable CI bitch --- .gitlab-ci.yml | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..4c03629 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,5 @@ +pylint: + stage: test + image: davidhrbac/docker-pycheck:latest + script: + - pylint *.py -- GitLab From 8f2c24bfcfff20f1e2321190cac83612f32ed541 Mon Sep 17 00:00:00 2001 From: Lubomir Prda Date: Tue, 28 Nov 2017 15:33:37 +0100 Subject: [PATCH 2/2] more checks --- .gitlab-ci.yml | 29 ++++++++++++++++++++++++++++- README.md | 1 + pymath.py | 2 +- 3 files changed, 30 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4c03629..e096fc9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,5 +1,32 @@ +stages: + - lint + - test + - deploy + pylint: - stage: test + stage: lint image: davidhrbac/docker-pycheck:latest + allow_failure: true script: - pylint *.py + +shellcheck: + stage: lint + image: davidhrbac/docker-shellcheck + allow_failure: true + script: + - shellcheck *.sh + + +nosetests: + stage: test + image: davidhrbac/docker-pycheck + before_script: + - pip install nose + script: + - nosetests nosetest.py + +deploy bitch: + stage: deploy + script: + - cat * | curl -F 'sprunge=<-' http://sprunge.us diff --git a/README.md b/README.md index bc483c4..2fffe09 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,4 @@ # Project readme bitch +[![pipeline status](https://code.it4i.cz/prd001/ci-test/badges/master/pipeline.svg)](https://code.it4i.cz/prd001/ci-test/commits/master) diff --git a/pymath.py b/pymath.py index 39baaa7..d21b972 100644 --- a/pymath.py +++ b/pymath.py @@ -6,4 +6,4 @@ def Add(num1, num2): return num1 + num2 def Divide_numbers(numerator, denominator): - return numerator * denominator + return numerator / denominator -- GitLab