diff --git a/.github/workflows/cd-docker-push-cockroach_oss.yaml b/.github/workflows/cd-docker-push-cockroach_oss.yaml index b3460533bb7..c88ba36a116 100644 --- a/.github/workflows/cd-docker-push-cockroach_oss.yaml +++ b/.github/workflows/cd-docker-push-cockroach_oss.yaml @@ -4,9 +4,9 @@ on: push: branches: - master - + workflow_dispatch: env: - CRDB_VERSIONS: v21.2.11 v22.1.0 + CRDB_VERSIONS: v21.2.11 v22.1.0 v23.1.14 jobs: build-services: diff --git a/.github/workflows/ci-dialect_oss.yaml b/.github/workflows/ci-dialect_oss.yaml index 588859d7d63..ee0e656e107 100644 --- a/.github/workflows/ci-dialect_oss.yaml +++ b/.github/workflows/ci-dialect_oss.yaml @@ -416,10 +416,10 @@ jobs: run: go test -race -count=2 -v -run="TiDB" -version="tidb6" -timeout 15m ./... - integration-cockroach: + integration-cockroach-21: runs-on: ubuntu-latest services: - cockroach: + cockroach-21: image: ghcr.io/ariga/cockroachdb-single-node:v21.2.11 ports: @@ -430,8 +430,46 @@ jobs: - uses: actions/setup-go@v4 with: go-version-file: cmd/atlas/go.mod - - name: Run integration tests for cockroach + - name: Run integration tests for cockroach-21 working-directory: internal/integration - run: go test -race -count=2 -v -run="Cockroach" -version="cockroach" -timeout 15m ./... + run: go test -race -count=2 -v -run="Cockroach" -version="cockroach-21" -timeout 15m ./... + + + integration-cockroach-22: + runs-on: ubuntu-latest + services: + cockroach-22: + image: ghcr.io/ariga/cockroachdb-single-node:v22.1.0 + + ports: + - 26258:26257 + + steps: + - uses: actions/checkout@v2.3.4 + - uses: actions/setup-go@v4 + with: + go-version-file: cmd/atlas/go.mod + - name: Run integration tests for cockroach-22 + working-directory: internal/integration + run: go test -race -count=2 -v -run="Cockroach" -version="cockroach-22" -timeout 15m ./... + + + integration-cockroach-23: + runs-on: ubuntu-latest + services: + cockroach-23: + image: ghcr.io/ariga/cockroachdb-single-node:v23.1.14 + + ports: + - 26259:26257 + + steps: + - uses: actions/checkout@v2.3.4 + - uses: actions/setup-go@v4 + with: + go-version-file: cmd/atlas/go.mod + - name: Run integration tests for cockroach-23 + working-directory: internal/integration + run: go test -race -count=2 -v -run="Cockroach" -version="cockroach-23" -timeout 15m ./... diff --git a/internal/ci/jobs_oss.go b/internal/ci/jobs_oss.go index b9e68c99767..3aef1ebd1bb 100644 --- a/internal/ci/jobs_oss.go +++ b/internal/ci/jobs_oss.go @@ -24,10 +24,22 @@ func init() { Ports: []string{"4310:4000"}, }, Job{ - Version: "cockroach", + Version: "cockroach-21", Image: "ghcr.io/ariga/cockroachdb-single-node:v21.2.11", Regex: "Cockroach", Ports: []string{"26257:26257"}, }, + Job{ + Version: "cockroach-22", + Image: "ghcr.io/ariga/cockroachdb-single-node:v22.1.0", + Regex: "Cockroach", + Ports: []string{"26258:26257"}, + }, + Job{ + Version: "cockroach-23", + Image: "ghcr.io/ariga/cockroachdb-single-node:v23.1.14", + Regex: "Cockroach", + Ports: []string{"26259:26257"}, + }, ) } diff --git a/internal/integration/cockroach_test.go b/internal/integration/cockroach_test.go index 3fb0ddd947b..987b53636fd 100644 --- a/internal/integration/cockroach_test.go +++ b/internal/integration/cockroach_test.go @@ -32,7 +32,9 @@ type crdbTest struct { } var crdbTests = map[string]*crdbTest{ - "cockroach": {port: 26257}, + "cockroach-21": {port: 26257}, + "cockroach-22": {port: 26258}, + "cockroach-23": {port: 26259}, } func crdbRun(t *testing.T, fn func(*crdbTest)) {