From 9200aad878c09ca5df39e83d64d4811b34ee4718 Mon Sep 17 00:00:00 2001 From: Joakim Olsson Date: Wed, 13 Nov 2024 12:34:40 +0100 Subject: [PATCH] refactor: use common pre-commit job Removes the `run-pre-commit` job from the CI configuration to streamline the pipeline and reduce unnecessary complexity. Adds inclusion of a new pre-commit template specifically for Go projects to ensure proper linting and formatting checks are performed in the CI process. --- .gitlab-ci.yml | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b7876e6..acbff5a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,6 +2,8 @@ include: - template: 'Workflows/MergeRequest-Pipelines.gitlab-ci.yml' - project: unboundsoftware/ci-templates file: Release.gitlab-ci.yml +- project: unboundsoftware/ci-templates + file: Pre-Commit-Go.gitlab-ci.yml stages: - build @@ -22,20 +24,6 @@ variables: services: - docker:${DOCKER_DIND_VERSION} -run-pre-commit: - stage: .pre - image: unbound/pre-commit@sha256:e78425cf8897cbf9c572b370bb8106f2c111d0df5e247966f41ae8e3e27ffdf9 - variables: - PRE_COMMIT_HOME: ${CI_PROJECT_DIR}/.cache/pre-commit - cache: - - key: - files: - - .pre-commit-config.yaml - paths: - - ${PRE_COMMIT_HOME} - script: - - pre-commit run --all-files - check: stage: .pre image: golang:1.23.3@sha256:b2ca38170893394183f940a7f988bf15c4112a4ddb73214941fe4d08a09f9329