fix(ci): run gitea workflow from repository workspace
Some checks failed
CI / verify (push) Failing after 1s

This commit is contained in:
Your Name
2026-05-06 11:47:53 +08:00
parent 86603659f9
commit 4d07c8f618

View File

@@ -10,28 +10,40 @@ on:
jobs: jobs:
verify: verify:
runs-on: ubuntu-latest runs-on: ubuntu-latest
env:
WORKSPACE_DIR: ${{ github.workspace }}
steps: steps:
- name: Verify Go toolchain - name: Verify Go toolchain
run: | run: |
echo "$WORKSPACE_DIR"
cd "$WORKSPACE_DIR"
go version go version
pwd pwd
test -f go.mod test -f go.mod
- name: Verify formatting - name: Verify formatting
run: | run: |
cd "$WORKSPACE_DIR"
gofmt -w $(find . -name '*.go' -not -path './vendor/*') gofmt -w $(find . -name '*.go' -not -path './vendor/*')
git diff --exit-code git diff --exit-code
- name: Run unit and integration tests - name: Run unit and integration tests
run: go test ./... -count=1 run: |
cd "$WORKSPACE_DIR"
go test ./... -count=1
- name: Run race tests - name: Run race tests
run: go test -race ./... run: |
cd "$WORKSPACE_DIR"
go test -race ./...
- name: Run vet - name: Run vet
run: go vet ./... run: |
cd "$WORKSPACE_DIR"
go vet ./...
- name: Check Gate scripts syntax - name: Check Gate scripts syntax
run: | run: |
cd "$WORKSPACE_DIR"
bash -n scripts/verify_preprod_gate_b.sh bash -n scripts/verify_preprod_gate_b.sh
bash -n scripts/verify_gate_c_rollback.sh bash -n scripts/verify_gate_c_rollback.sh