ci: collect coverage inline on Postgres job, remove duplicate Coverage job (#36216)

The Coverage job ran the same tests as Postgres with only ENABLE_COVERAGE=true
and a Codecov upload as differences. Enable coverage directly on the Postgres
job under the same release-branch skip condition, eliminating 4x 8-core runner
hours per PR.
This commit is contained in:
Jesse Hallam
2026-04-22 13:26:04 -03:00
committed by GitHub
parent b63e32057d
commit b82cfe1a4e
+1 -23
View File
@@ -215,6 +215,7 @@ jobs:
drivername: postgres
# Each shard gets a unique artifact name so they don't collide
logsartifact: "postgres-server-test-logs-shard-${{ matrix.shard }}"
enablecoverage: ${{ github.event_name != 'pull_request' || !startsWith(github.event.pull_request.base.ref, 'release-') }}
go-version: ${{ needs.go.outputs.version }}
fips-enabled: false
shard-index: ${{ matrix.shard }}
@@ -275,29 +276,6 @@ jobs:
artifact-pattern: postgres-server-fips-test-logs-shard-*
artifact-name: postgres-server-fips-test-logs
test-coverage:
name: "Coverage (shard ${{ matrix.shard }})"
if: ${{ github.event_name != 'pull_request' || !startsWith(github.event.pull_request.base.ref, 'release-') }}
needs: go
strategy:
fail-fast: false
matrix:
shard: [0, 1, 2, 3]
uses: ./.github/workflows/server-test-template.yml
secrets: inherit
with:
name: "Coverage (shard ${{ matrix.shard }})"
datasource: postgres://mmuser:mostest@postgres:5432/mattermost_test?sslmode=disable&connect_timeout=10
drivername: postgres
logsartifact: "coverage-server-test-logs-shard-${{ matrix.shard }}"
fullyparallel: true
allow-failure: true
enablecoverage: true
go-version: ${{ needs.go.outputs.version }}
fips-enabled: false
# runner: ubuntu-22.04 # Coverage is non-blocking (allow-failure), no need for 8-core
shard-index: ${{ matrix.shard }}
shard-total: 4
test-mmctl:
name: Run mmctl tests
needs: go