From 4d07c8f618d54be53e58710e7cd2003a053b8fe6 Mon Sep 17 00:00:00 2001 From: Your Name Date: Wed, 6 May 2026 11:47:53 +0800 Subject: [PATCH] fix(ci): run gitea workflow from repository workspace --- .gitea/workflows/ci.yml | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 679eab3..ce75aa7 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -10,28 +10,40 @@ on: jobs: verify: runs-on: ubuntu-latest + env: + WORKSPACE_DIR: ${{ github.workspace }} steps: - name: Verify Go toolchain run: | + echo "$WORKSPACE_DIR" + cd "$WORKSPACE_DIR" go version pwd test -f go.mod - name: Verify formatting run: | + cd "$WORKSPACE_DIR" gofmt -w $(find . -name '*.go' -not -path './vendor/*') git diff --exit-code - name: Run unit and integration tests - run: go test ./... -count=1 + run: | + cd "$WORKSPACE_DIR" + go test ./... -count=1 - name: Run race tests - run: go test -race ./... + run: | + cd "$WORKSPACE_DIR" + go test -race ./... - name: Run vet - run: go vet ./... + run: | + cd "$WORKSPACE_DIR" + go vet ./... - name: Check Gate scripts syntax run: | + cd "$WORKSPACE_DIR" bash -n scripts/verify_preprod_gate_b.sh bash -n scripts/verify_gate_c_rollback.sh