Skip to content

Commit e6761e6

Browse files
committed
Do not run full test-suite with Postgres on Windows/MacOS on each PR
Signed-off-by: Danny Kopping <danny@coder.com>
1 parent c4de10e commit e6761e6

File tree

1 file changed

+2
-32
lines changed

1 file changed

+2
-32
lines changed

.github/workflows/ci.yaml

Lines changed: 2 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@ jobs:
438438
api-key: ${{ secrets.DATADOG_API_KEY }}
439439

440440
test-go-pg:
441-
runs-on: ${{ matrix.os == 'ubuntu-latest' && github.repository_owner == 'coder' && 'depot-ubuntu-22.04-4' || matrix.os == 'macos-latest' && github.repository_owner == 'coder' && 'depot-macos-latest' || matrix.os == 'windows-2022' && github.repository_owner == 'coder' && 'windows-latest-16-cores' || matrix.os }}
441+
runs-on: ${{ matrix.os == 'ubuntu-latest' && github.repository_owner == 'coder' && 'depot-ubuntu-22.04-4' || matrix.os }}
442442
needs: changes
443443
if: needs.changes.outputs.go == 'true' || needs.changes.outputs.ci == 'true' || github.ref == 'refs/heads/main'
444444
# This timeout must be greater than the timeout set by `go test` in
@@ -450,8 +450,6 @@ jobs:
450450
matrix:
451451
os:
452452
- ubuntu-latest
453-
- macos-latest
454-
- windows-2022
455453
steps:
456454
- name: Harden Runner
457455
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
@@ -482,39 +480,11 @@ jobs:
482480
LC_ALL: "en_US.UTF-8"
483481
shell: bash
484482
run: |
485-
# if macOS, install google-chrome for scaletests
486-
# As another concern, should we really have this kind of external dependency
487-
# requirement on standard CI?
488-
if [ "${{ matrix.os }}" == "macos-latest" ]; then
489-
brew install google-chrome
490-
fi
491-
492483
# By default Go will use the number of logical CPUs, which
493484
# is a fine default.
494485
PARALLEL_FLAG=""
495486
496-
# macOS will output "The default interactive shell is now zsh"
497-
# intermittently in CI...
498-
if [ "${{ matrix.os }}" == "macos-latest" ]; then
499-
touch ~/.bash_profile && echo "export BASH_SILENCE_DEPRECATION_WARNING=1" >> ~/.bash_profile
500-
fi
501-
502-
if [ "${{ runner.os }}" == "Linux" ]; then
503-
make test-postgres
504-
elif [ "${{ runner.os }}" == "Windows" ]; then
505-
# Create a temp dir on the R: ramdisk drive for Windows. The default
506-
# C: drive is extremely slow: https://github.com/actions/runner-images/issues/8755
507-
mkdir -p "R:/temp/embedded-pg"
508-
go run scripts/embedded-pg/main.go -path "R:/temp/embedded-pg"
509-
# Reduce test parallelism, mirroring what we do for race tests.
510-
# We'd been encountering issues with timing related flakes, and
511-
# this seems to help.
512-
DB=ci gotestsum --format standard-quiet -- -v -short -count=1 -parallel 4 -p 4 ./...
513-
else
514-
go run scripts/embedded-pg/main.go
515-
# Reduce test parallelism, like for Windows above.
516-
DB=ci gotestsum --format standard-quiet -- -v -short -count=1 -parallel 4 -p 4 ./...
517-
fi
487+
make test-postgres
518488
519489
- name: Upload test stats to Datadog
520490
timeout-minutes: 1

0 commit comments

Comments
 (0)