From c8532548825b9f01601e096e8286ee011dbfac8e Mon Sep 17 00:00:00 2001 From: Tobias Schmidl Date: Fri, 12 Feb 2021 07:07:05 +0100 Subject: [PATCH] switched to python:alpine docker image, added conditional call to pytest, made call to pylama conditional --- .gitlab-ci.yml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0b62edf..3a1d417 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,4 +1,4 @@ -image: python +image: python:alpine test:pylama: stage: test @@ -8,5 +8,15 @@ test:pylama: before_script: - if test -r requirements.txt; then pip install -r requirements.txt; fi script: - pylama *.py + if test -x "$(which pylama)"; then pylama *.py; fi + +test:pytest: + stage: test + only: + - master + - develop + before_script: + - if test -r requirements.txt; then pip install -r requirements.txt; fi + script: + if test -x "$(which pytest)"; then pytest .; fi