mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
chore: tune postgres CI tests (#17756)
Changes: - use a bigger runner for test-go-pg on Linux - use a depot runner to run postgres tests on Windows - use the same Windows ramdisk action for postgres tests as the one currently used for in-memory tests - put GOTMPDIR on a ramdisk on Windows - tune the number of tests running in parallel on macOS and Windows - use a ramdisk for postgres on macOS - turn off Spotlight indexing on macOS - rerun failing tests to stop flakes from disrupting developers Results: - test-go-pg on Linux completing in 50% of the time it takes to run on main ([run on main](https://github.com/coder/coder/actions/runs/14937632073/job/41968714750), [run on this PR](https://github.com/coder/coder/actions/runs/14956584795/job/42013097674?pr=17756)) - macOS tests completing in 70% of the time ([run on main](https://github.com/coder/coder/actions/runs/14921155015/job/41916639889), [run on this PR](https://github.com/coder/coder/actions/runs/14956590940/job/42013102975)) - Windows tests completing in 50% of the time ([run on main](https://github.com/coder/coder/actions/runs/14921155015/job/41916640058), [run on this PR](https://github.com/coder/coder/actions/runs/14956590940/job/42013103116)) This PR helps unblock https://github.com/coder/coder/issues/15109.
This commit is contained in:
@@ -26,13 +26,15 @@ runs:
|
||||
export GOCACHE_DIR="$RUNNER_TEMP""\go-cache"
|
||||
export GOMODCACHE_DIR="$RUNNER_TEMP""\go-mod-cache"
|
||||
export GOPATH_DIR="$RUNNER_TEMP""\go-path"
|
||||
export GOTMP_DIR="$RUNNER_TEMP""\go-tmp"
|
||||
mkdir -p "$GOCACHE_DIR"
|
||||
mkdir -p "$GOMODCACHE_DIR"
|
||||
mkdir -p "$GOPATH_DIR"
|
||||
mkdir -p "$GOTMP_DIR"
|
||||
go env -w GOCACHE="$GOCACHE_DIR"
|
||||
go env -w GOMODCACHE="$GOMODCACHE_DIR"
|
||||
go env -w GOPATH="$GOPATH_DIR"
|
||||
|
||||
go env -w GOTMPDIR="$GOTMP_DIR"
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
|
||||
with:
|
||||
|
||||
Reference in New Issue
Block a user