Skip to content

Commit

Permalink
chore: test more versions
Browse files Browse the repository at this point in the history
  • Loading branch information
giautm committed Feb 1, 2024
1 parent 5c2aa52 commit 763bef4
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cd-docker-push-cockroach_oss.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:
branches:
- master

workflow_dispatch:
env:
CRDB_VERSIONS: v21.2.11 v22.1.0 v23.1.14

Expand Down
48 changes: 43 additions & 5 deletions .github/workflows/ci-dialect_oss.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -416,11 +416,11 @@ 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:
image: ghcr.io/ariga/cockroachdb-single-node:v23.1.14
cockroach-21:
image: ghcr.io/ariga/cockroachdb-single-node:v21.2.11

ports:
- 26257:26257
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-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/[email protected]
- 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/[email protected]
- 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" -timeout 15m ./...
run: go test -race -count=2 -v -run="Cockroach" -version="cockroach-23" -timeout 15m ./...


16 changes: 14 additions & 2 deletions 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",
Image: "ghcr.io/ariga/cockroachdb-single-node:v23.1.14",
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

0 comments on commit 763bef4

Please sign in to comment.