diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 96facb312e3..b4f33c9bd78 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,7 +30,7 @@ jobs: - name: Run lints run: ./scripts/lint test: - timeout-minutes: 10 + timeout-minutes: 30 name: test runs-on: ${{ github.repository == 'stainless-sdks/cloudflare-go' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} if: github.event_name == 'push' || github.event.pull_request.head.repo.fork diff --git a/scripts/test b/scripts/test index c26b1222810..d48e502f4a9 100755 --- a/scripts/test +++ b/scripts/test @@ -14,7 +14,7 @@ function prism_is_running() { } kill_server_on_port() { - pids=$(lsof -t -i tcp:"$1" || echo "") + pids=$(lsof -t -i tcp:"$1" -sTCP:LISTEN 2>/dev/null || echo "") if [ "$pids" != "" ]; then kill "$pids" echo "Stopped $pids." @@ -53,4 +53,5 @@ else fi echo "==> Running tests" -go test ./... "$@" +go clean -cache -testcache -modcache +go test -timeout 30m -p 4 ./... "$@"