Skip to content

feat(pg/review): add DISALLOW_DROP_CONSTRAINT, REQUIRE_PRIMARY_KEY, and PRIOR_BACKUP #1392

feat(pg/review): add DISALLOW_DROP_CONSTRAINT, REQUIRE_PRIMARY_KEY, and PRIOR_BACKUP

feat(pg/review): add DISALLOW_DROP_CONSTRAINT, REQUIRE_PRIMARY_KEY, and PRIOR_BACKUP #1392

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
ci:
# One job on the org's self-hosted runners. A PR runs the tests of the
# engines it touches (scripts/affected-packages.sh); a push to main runs
# everything. Every test runs here; nothing is skipped and nothing is nightly.
runs-on: self-hosted
timeout-minutes: 30
env:
# Sweep sizes the old nightly used; they add ~20 s here, so every PR gets them.
PAREN_FUZZ_SIZE: '10000'
SPLITTEST_N: '1000000'
S3DIFF_N: '2000'
services:
trino:
# The trino oracle tests need a live Trino; the runner waits for the
# image's health check. Keep the tag in sync with trinooracle.DefaultImage.
image: trinodb/trino:482
ports: ['8080']
spanner:
# The googlesql differentials record verdicts from this exact emulator
# build (sha256:caf1bd24…); newer builds drift, so keep it pinned.
image: gcr.io/cloud-spanner-emulator/emulator:1.5.54
ports: ['9010']
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # affected-packages.sh diffs against the base branch
- uses: actions/setup-go@v5
with:
go-version: '1.25'
cache: false # the runner keeps GOCACHE/GOMODCACHE between runs
- name: Generated code and proto are in sync
run: |
go generate ./pg/ast/... ./mysql/ast/... ./mssql/ast/...
make proto proto-breaking
git status --porcelain
test -z "$(git status --porcelain)"
- name: Build
run: go build ./...
- name: Affected packages
id: affected
run: |
if [ "${{ github.event_name }}" = pull_request ]; then
pkgs=$(scripts/affected-packages.sh origin/${{ github.base_ref }})
else
pkgs=./...
fi
echo "pkgs=$pkgs" | tee -a "$GITHUB_OUTPUT"
- name: Test
if: steps.affected.outputs.pkgs != ''
env:
TRINO_ORACLE_URL: http://localhost:${{ job.services.trino.ports['8080'] }}
SPANNER_EMULATOR_HOST: localhost:${{ job.services.spanner.ports['9010'] }}
# The trino packages share the one Trino service and run stateful DDL
# against the same names, so they run one at a time, after the rest.
run: |
pkgs=$(go list ${{ steps.affected.outputs.pkgs }})
{ grep -v /trino/ <<< "$pkgs" || true; } | xargs -r go test -p=8 -count=1
{ grep /trino/ <<< "$pkgs" || true; } | xargs -r go test -p=1 -count=1
- name: Nested modules (own go.mod, not reached by ./...)
env:
SPANNER_EMULATOR_HOST: localhost:${{ job.services.spanner.ports['9010'] }}
run: |
(cd harness/conformance && go test -count=1 ./...)
(cd harness/googlesql-spanner && go test -count=1 ./...)