From 5e2b9180e62b1dfcf018ebcf748ee7e023b17bfc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aneta=20Tla=C5=82ka?= Date: Tue, 24 Oct 2023 18:29:49 +0200 Subject: [PATCH] test script --- Jenkinsfile | 7 +++---- check_flat_price.py | 8 ++++++++ 2 files changed, 11 insertions(+), 4 deletions(-) create mode 100644 check_flat_price.py diff --git a/Jenkinsfile b/Jenkinsfile index eff229c..12bb48d 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,6 +1,6 @@ pipeline { agent { - docker { image 'node:18.18.2-alpine3.18' } + docker { image 'alpine/flake8:3.5.0' } } stages { @@ -10,10 +10,9 @@ pipeline { } } stage('Test') { - when { expression { return fileExists ('CenaMieszkaniaDesign.py') } } steps { - echo "file exists" - } + sh 'flake check_flat_price.py' + } } stage('Deploy') { steps { diff --git a/check_flat_price.py b/check_flat_price.py new file mode 100644 index 0000000..4d66148 --- /dev/null +++ b/check_flat_price.py @@ -0,0 +1,8 @@ +import pandas as pd +import numpy as np + +ceny = pd.read_csv('expected.tsv', sep='\t', header=None) + +for cena in ceny: + if cena < 0: + print("cena ujemna, sprawdz cene") \ No newline at end of file