ci: set working-directory for test job

This commit is contained in:
Jarian Cottingham 2026-07-06 06:27:21 +00:00
parent 93f54aeca5
commit 182f82775a

View File

@ -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: