From 1a69f5ea8f93fe112fea33ded0de68a17c50590c Mon Sep 17 00:00:00 2001 From: Cian Johnston Date: Thu, 7 Aug 2025 10:35:29 +0100 Subject: [PATCH] ci: consolidate tests on postgres 13 --- .github/workflows/ci.yaml | 58 +-------------------------------------- Makefile | 2 +- 2 files changed, 2 insertions(+), 58 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 0f0a4056eea5f..3d2daa482eded 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -523,62 +523,6 @@ jobs: with: api-key: ${{ secrets.DATADOG_API_KEY }} - # NOTE: this could instead be defined as a matrix strategy, but we want to - # only block merging if tests on postgres 13 fail. Using a matrix strategy - # here makes the check in the above `required` job rather complicated. - test-go-pg-17: - runs-on: ${{ github.repository_owner == 'coder' && 'depot-ubuntu-22.04-8' || 'ubuntu-latest' }} - needs: - - changes - if: needs.changes.outputs.go == 'true' || needs.changes.outputs.ci == 'true' || github.ref == 'refs/heads/main' - # This timeout must be greater than the timeout set by `go test` in - # `make test-postgres` to ensure we receive a trace of running - # goroutines. Setting this to the timeout +5m should work quite well - # even if some of the preceding steps are slow. - timeout-minutes: 25 - steps: - - name: Harden Runner - uses: step-security/harden-runner@ec9f2d5744a09debf3a187a3f4f675c53b671911 # v2.13.0 - with: - egress-policy: audit - - - name: Checkout - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - with: - fetch-depth: 1 - - - name: Setup Go - uses: ./.github/actions/setup-go - - - name: Setup Terraform - uses: ./.github/actions/setup-tf - - - name: Download Test Cache - id: download-cache - uses: ./.github/actions/test-cache/download - with: - key-prefix: test-go-pg-17-${{ runner.os }}-${{ runner.arch }} - - - name: Test with PostgreSQL Database - env: - POSTGRES_VERSION: "17" - TS_DEBUG_DISCO: "true" - run: | - make test-postgres - - - name: Upload Test Cache - uses: ./.github/actions/test-cache/upload - with: - cache-key: ${{ steps.download-cache.outputs.cache-key }} - - - name: Upload test stats to Datadog - timeout-minutes: 1 - continue-on-error: true - uses: ./.github/actions/upload-datadog - if: success() || failure() - with: - api-key: ${{ secrets.DATADOG_API_KEY }} - test-go-race-pg: runs-on: ${{ github.repository_owner == 'coder' && 'depot-ubuntu-22.04-16' || 'ubuntu-latest' }} needs: changes @@ -613,7 +557,7 @@ jobs: # c.f. discussion on https://github.com/coder/coder/pull/15106 - name: Run Tests env: - POSTGRES_VERSION: "17" + POSTGRES_VERSION: "13" run: | make test-postgres-docker gotestsum --junitfile="gotests.xml" --packages="./..." -- -race -parallel 4 -p 4 diff --git a/Makefile b/Makefile index bd3f04a4874cd..5e659b530617e 100644 --- a/Makefile +++ b/Makefile @@ -37,7 +37,7 @@ GOARCH := $(shell go env GOARCH) GOOS_BIN_EXT := $(if $(filter windows, $(GOOS)),.exe,) VERSION := $(shell ./scripts/version.sh) -POSTGRES_VERSION ?= 17 +POSTGRES_VERSION ?= 13 POSTGRES_IMAGE ?= us-docker.pkg.dev/coder-v2-images-public/public/postgres:$(POSTGRES_VERSION) # Use the highest ZSTD compression level in CI.