dda-python-terraform/.gitlab-ci.yml

29 lines
536 B
YAML
Raw Normal View History

2021-10-15 14:33:09 +00:00
image: "python:3.7"
before_script:
- python --version
- pip install -r requirements.txt
2021-10-15 14:37:59 +00:00
- 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
2021-10-15 14:33:09 +00:00
stages:
2021-10-15 14:37:59 +00:00
- test
2021-10-15 14:33:09 +00:00
flake8:
2021-10-15 14:37:59 +00:00
stage: test
2021-10-15 14:33:09 +00:00
script:
2021-10-15 14:37:59 +00:00
- flake8 --max-line-length=120 python_terraform/*.py
pytest:
stage: test
script:
- PATH=$PATH:$PWD/tf_bin pytest -v