From 182f82775a212cf3ff350f19a99d5c99ca91c765 Mon Sep 17 00:00:00 2001 From: Jarian Cottingham Date: Mon, 6 Jul 2026 06:27:21 +0000 Subject: [PATCH] ci: set working-directory for test job --- .gitea/workflows/ci.yml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 44063e1..9216915 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -46,11 +46,14 @@ jobs: runs-on: ubuntu-latest container: image: gitea-job-image + defaults: + run: + working-directory: ${{ github.workspace }} steps: - name: Clone repo run: | - rm -rf $GITHUB_WORKSPACE/* - git clone --depth 1 $GITEA_URL/$GITHUB_REPOSITORY $GITHUB_WORKSPACE + rm -rf ${GITHUB_WORKSPACE:?}/* + git clone --recurse-submodules $GITEA_URL/$GITHUB_REPOSITORY $GITHUB_WORKSPACE git -C $GITHUB_WORKSPACE checkout $GITHUB_SHA 2>/dev/null || true - name: Install Python deps @@ -82,6 +85,15 @@ jobs: echo "No Go project detected, skipping go test" fi + - name: Run Go tests + if: always() + run: | + if [[ -f go.mod ]]; then + go test ./... + else + echo "No Go project detected, skipping go test" + fi + docker-build: runs-on: ubuntu-latest steps: