@@ -325,6 +325,7 @@ jobs:
325325 run : ./scripts/check_unstaged.sh
326326
327327 test-go-pg :
328+ name : test-go-pg (${{ matrix.os }})
328329 # make sure to adjust NUM_PARALLEL_PACKAGES and NUM_PARALLEL_TESTS below
329330 # when changing runner sizes
330331 runs-on : ${{ matrix.os == 'ubuntu-latest' && github.repository_owner == 'coder' && 'depot-ubuntu-22.04-16' || matrix.os && matrix.os == 'macos-latest' && github.repository_owner == 'coder' && 'depot-macos-latest' || matrix.os == 'windows-2022' && github.repository_owner == 'coder' && 'depot-windows-2022-32' || matrix.os }}
@@ -341,6 +342,17 @@ jobs:
341342 - ubuntu-latest
342343 - macos-latest
343344 - windows-2022
345+ # Use the GitHub ref to determine if we should run on all OSes.
346+ # Evaluates to true on main, false otherwise.
347+ isMain :
348+ - ${{ github.ref == 'refs/heads/main' }}
349+ # macOS and Windows are tested on main only to improve CI speed, and we don't see much use on these platforms.
350+ # See nightly-gauntlet.yaml for comprehensive macOS/Windows coverage.
351+ exclude :
352+ - isMain : false
353+ os : macos-latest
354+ - isMain : false
355+ os : windows-2022
344356 steps :
345357 - name : Harden Runner
346358 uses : step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
@@ -461,7 +473,7 @@ jobs:
461473 test-count : ${{ github.ref == 'refs/heads/main' && '1' || '' }}
462474
463475 - name : Test with PostgreSQL Database (macOS)
464- if : runner.os == 'macOS' && github.ref == 'refs/heads/main'
476+ if : runner.os == 'macOS'
465477 uses : ./.github/actions/test-go-pg
466478 with :
467479 postgres-version : " 13"
@@ -477,7 +489,7 @@ jobs:
477489 embedded-pg-cache : ${{ steps.embedded-pg-cache.outputs.embedded-pg-cache }}
478490
479491 - name : Test with PostgreSQL Database (Windows)
480- if : runner.os == 'Windows' && github.ref == 'refs/heads/main'
492+ if : runner.os == 'Windows'
481493 uses : ./.github/actions/test-go-pg
482494 with :
483495 postgres-version : " 13"
0 commit comments