From a50709c67b34c5d847955f776d04b0488db8baeb Mon Sep 17 00:00:00 2001 From: "Giau. Tran Minh" Date: Thu, 25 Jan 2024 00:47:47 +0700 Subject: [PATCH] chore: added sqlserver test --- .github/workflows/ci.yaml | 2 +- testdata/atlas-script.hcl | 1 + testdata/atlas-standalone.hcl | 1 + testdata/ts/atlas-script.hcl | 1 + testdata/ts/atlas-standalone.hcl | 1 + testdata/ts/load-entities.ts | 2 +- 6 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 0e19948..153bbfc 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -37,7 +37,7 @@ jobs: integration-tests: strategy: matrix: - dialect: [ mysql, postgres, sqlite ] + dialect: [ mysql, postgres, sqlite, mssql ] language: [ ts, js ] runs-on: ubuntu-latest steps: diff --git a/testdata/atlas-script.hcl b/testdata/atlas-script.hcl index 644ec3b..c040709 100644 --- a/testdata/atlas-script.hcl +++ b/testdata/atlas-script.hcl @@ -6,6 +6,7 @@ locals { dev_url = { mysql = "docker://mysql/8/dev" postgres = "docker://postgres/15" + mssql = "docker://sqlserver/2022-latest" sqlite = "sqlite://file::memory:?cache=shared" }[var.dialect] } diff --git a/testdata/atlas-standalone.hcl b/testdata/atlas-standalone.hcl index 147b8db..16d0439 100644 --- a/testdata/atlas-standalone.hcl +++ b/testdata/atlas-standalone.hcl @@ -6,6 +6,7 @@ locals { dev_url = { mysql = "docker://mysql/8/dev" postgres = "docker://postgres/15" + mssql = "docker://sqlserver/2022-latest" sqlite = "sqlite://file::memory:?cache=shared" }[var.dialect] } diff --git a/testdata/ts/atlas-script.hcl b/testdata/ts/atlas-script.hcl index eb4c86e..c3c57b6 100644 --- a/testdata/ts/atlas-script.hcl +++ b/testdata/ts/atlas-script.hcl @@ -6,6 +6,7 @@ locals { dev_url = { mysql = "docker://mysql/8/dev" postgres = "docker://postgres/15" + mssql = "docker://sqlserver/2022-latest" sqlite = "sqlite://file::memory:?cache=shared" }[var.dialect] } diff --git a/testdata/ts/atlas-standalone.hcl b/testdata/ts/atlas-standalone.hcl index 13b35d2..da46678 100644 --- a/testdata/ts/atlas-standalone.hcl +++ b/testdata/ts/atlas-standalone.hcl @@ -6,6 +6,7 @@ locals { dev_url = { mysql = "docker://mysql/8/dev" postgres = "docker://postgres/15" + mssql = "docker://sqlserver/2022-latest" sqlite = "sqlite://file::memory:?cache=shared" }[var.dialect] } diff --git a/testdata/ts/load-entities.ts b/testdata/ts/load-entities.ts index 9e9d90f..16bb81f 100644 --- a/testdata/ts/load-entities.ts +++ b/testdata/ts/load-entities.ts @@ -10,7 +10,7 @@ import { Blog as SqliteBlog } from "./entities/sqlite/Blog"; const dialect = process.argv[2] as Dialect; // sqlite does not support enum, so we need to load different entities -if (dialect === "sqlite") { +if (dialect === "sqlite" || dialect === "mssql") { loadEntities("sqlite", [SqliteUser, SqliteBlog]).then((sql) => { console.log(sql); });