From a22a4cd0b38f913dff1c2cb5a3d0ba38e2ce87f4 Mon Sep 17 00:00:00 2001 From: jo <ljonas@riseup.net> Date: Mon, 10 Oct 2022 23:23:00 +0200 Subject: [PATCH] ci: add pre-commit job --- .gitlab-ci.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8f53c05..adfa5cd 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -6,6 +6,21 @@ stages: variables: LATEST_VERSION_URL: https://docs.funkwhale.audio/latest.txt +pre-commit: + stage: test + image: python:3.11 + variables: + PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip" + PRE_COMMIT_HOME: "$CI_PROJECT_DIR/.cache/pre-commit" + cache: + paths: + - $CI_PROJECT_DIR/.cache/pip + - $CI_PROJECT_DIR/.cache/pre-commit + before_script: + - pip3 install pre-commit + script: + - pre-commit run --all --color=always --show-diff-on-failure + test-install-script: stage: test image: $TEST_IMAGE -- GitLab