Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

crdb: add latest version in test #2496

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/cd-docker-push-cockroach_oss.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
46 changes: 42 additions & 4 deletions .github/workflows/ci-dialect_oss.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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 ./...


14 changes: 13 additions & 1 deletion internal/ci/jobs_oss.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"},
},
)
}
4 changes: 3 additions & 1 deletion internal/integration/cockroach_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down