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: