From 9b6d55eda07d1cb96144ce8213c599cf4e2eb253 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Mon, 2 Oct 2023 13:45:35 +0200 Subject: [PATCH] ci: run git unshallow conditionally --- .woodpecker/test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.woodpecker/test.yml b/.woodpecker/test.yml index b832805..76dbee3 100644 --- a/.woodpecker/test.yml +++ b/.woodpecker/test.yml @@ -16,7 +16,8 @@ steps: fetch: image: docker.io/library/python:3.11 commands: - - git fetch --unshallow --quiet + - > + [ -f "$(git rev-parse --is-shallow-repository)" ] && git fetch --unshallow --quiet || true pytest: image: ${PYTHON_VERSION}