From af20c6da16aaa6f14e7932b24dde09e95af61756 Mon Sep 17 00:00:00 2001 From: jem Date: Fri, 15 Oct 2021 16:37:59 +0200 Subject: [PATCH] add pytest --- .gitlab-ci.yml | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 741be0b..6c4364b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,11 +3,26 @@ image: "python:3.7" before_script: - python --version - pip install -r requirements.txt + - export TFVER=0.13.4 + - export TFURL=https://releases.hashicorp.com/terraform/ + - TFURL+=$TFVER + - TFURL+="/terraform_" + - TFURL+=$TFVER + - TFURL+="_linux_amd64.zip" + - wget $TFURL -O terraform_bin.zip + - mkdir tf_bin + - unzip terraform_bin.zip -d tf_bin stages: - - Static Analysis + - test flake8: - stage: Static Analysis + stage: test script: - - flake8 --max-line-length=120 bild/*.py + - flake8 --max-line-length=120 python_terraform/*.py + + +pytest: + stage: test + script: + - PATH=$PATH:$PWD/tf_bin pytest -v