From 02fd3a9e7949b9d5b48e68629a2fad289f96193f Mon Sep 17 00:00:00 2001 From: Alfred Wingate Date: Wed, 15 Nov 2023 18:42:35 +0200 Subject: [PATCH] Add gitlab CI Signed-off-by: Alfred Wingate --- .gitlab-ci.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..4ff6027 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,25 @@ +image: python:latest + +variables: + PIP_CACHE_DIR: ${CI_PROJECT_DIR}/.cache/pip + +cache: + paths: + - ${PIP_CACHE_DIR} + +before_script: + - python --version ; pip --version + - pip install virtualenv + - virtualenv venv + - source venv/bin/activate + +pre-commit: + variables: + PRE_COMMIT_HOME: ${CI_PROJECT_DIR}/.cache/pre-commit + cache: + paths: + - ${PRE_COMMIT_HOME} + script: + - pip install pre-commit + - pre-commit run --all-files +