diff --git a/.gitea/workflows/go-test.yml b/.gitea/workflows/go-test.yml index 71a3702..4c14f13 100644 --- a/.gitea/workflows/go-test.yml +++ b/.gitea/workflows/go-test.yml @@ -17,6 +17,7 @@ jobs: run: go version - name: Run tests (use module/workspace if present; else fallback) + shell: bash run: | set -e if [ -f go.mod ] || [ -f go.work ]; then @@ -29,11 +30,11 @@ jobs: import "fmt" func main(){ fmt.Println("hello") } EOF - cat > main_test.go <<'EOF' + cat > main_test.go <<'EOF' package main import "testing" func TestMath(t *testing.T){ if 2+2 != 4 { t.Fatal("bad math") } } EOF go mod init example.com/ci go test ./... - fi \ No newline at end of file + fi