diff --git a/case-1-lint/linting_job.yml b/case-1-lint/linting_job.yml new file mode 100644 index 0000000000000000000000000000000000000000..b79a3158e09d20faa149b0659cbfb1a6599ab11c --- /dev/null +++ b/case-1-lint/linting_job.yml @@ -0,0 +1,35 @@ +# To contribute improvements to CI/CD templates, please follow the Development guide at: +# https://docs.gitlab.com/ee/development/cicd/templates.html +# This specific template is located at: +# https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Python.gitlab-ci.yml + +# Official language image. Look for the different tagged releases at: +# https://hub.docker.com/r/library/python/tags/ +image: python:latest + +# Change pip's cache directory to be inside the project directory since we can +# only cache local items. +variables: + PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip" + +# Pip's cache doesn't store the python packages +# https://pip.pypa.io/en/stable/topics/caching/ +# +# If you want to also cache the installed packages, you have to install +# them in a virtualenv and cache it as well. +cache: + paths: + - .cache/pip + - venv/ + +before_script: + - python --version # For debugging + - python3 -m venv venv + - source venv/bin/activate + + +❄️8: + stage: code_quality + script: + - pip install -U flake8 + - flake8 ./case-1-lint/