Skip to content

Commit cd587db

Browse files
committed
chore(ci): migrate mssql samples to new ci
1 parent 7de4517 commit cd587db

6 files changed

Lines changed: 36 additions & 6 deletions

File tree

.github/config/nodejs-dev.jsonc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,8 @@
101101
"batch",
102102
"cloud-language",
103103
"cloud-sql/mysql/mysql",
104-
"cloud-sql/mysql/mysql2",
105-
"cloud-sql/postgres/knex",
104+
"cloud-sql/sqlserver/mssql",
105+
"cloud-sql/sqlserver/tedious",
106106
"cloud-tasks/snippets",
107107
"cloud-tasks/tutorial-gcf/app",
108108
"cloud-tasks/tutorial-gcf/function",

.github/config/nodejs.jsonc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@
7777
// TODO: fix these
7878
"ai-platform/snippets", // PERMISSION_DENIED: Permission denied: Consumer 'projects/undefined' has been suspended.
7979
"automl", // (untested) FAILED_PRECONDITION: Google Cloud AutoML Natural Language was retired on March 15, 2024. Please migrate to Vertex AI instead
80-
"cloud-sql/sqlserver/mssql", // (untested) TypeError: The "config.server" property is required and must be of type string.
81-
"cloud-sql/sqlserver/tedious", // (untested) TypeError: The "config.server" property is required and must be of type string.
80+
"cloud-sql/mysql/mysql2", // (untested) Error: Cannot find module './connect-connector-with-iam-authn.js'
81+
"cloud-sql/postgres/knex", // (untested) CloudSQLConnectorError: Malformed instance connection name provided: expected format of "PROJECT:REGION:INSTANCE", got undefined
8282
"compute", // GoogleError: The resource 'projects/long-door-651/zones/us-central1-a/disks/disk-from-pool-name' was not found
8383
"dataproc", // GoogleError: Error submitting create cluster request: Multiple validation errors
8484
"datastore/functions", // [ERR_REQUIRE_ESM]: require() of ES Module
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"env": {
3+
"INSTANCE_HOST": "127.0.0.1",
4+
"INSTANCE_CONNECTION_NAME": "nodejs-docs-samples-tests:us-central1:sql-server-ci",
5+
"UNIX_SOCKET_DIR": "tmp/cloudsql",
6+
"CLOUD_SQL_CONNECTION_NAME": "$INSTANCE_CONNECTION_NAME",
7+
"INSTANCE_UNIX_SOCKET": "$UNIX_SOCKET_DIR/$INSTANCE_CONNECTION_NAME",
8+
"DB_NAME": "kokoro_ci",
9+
"DB_USER": "kokoro_ci"
10+
},
11+
"secrets": {
12+
"DB_PASS": "nodejs-docs-samples-tests/nodejs-docs-samples-sql-password"
13+
}
14+
}

cloud-sql/sqlserver/mssql/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
},
1414
"scripts": {
1515
"start": "node server/server.js",
16-
"system-test": "c8 mocha -p -j 2 test/*.test.js --timeout=60000 --exit",
16+
"proxy": "$GITHUB_WORKSPACE/.github/workflows/utils/sql-proxy.sh",
17+
"system-test": "npm run proxy -- c8 mocha -p -j 2 test/*.test.js --timeout=60000 --exit",
1718
"test": "npm run system-test"
1819
},
1920
"dependencies": {
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"env": {
3+
"INSTANCE_HOST": "127.0.0.1",
4+
"INSTANCE_CONNECTION_NAME": "nodejs-docs-samples-tests:us-central1:sql-server-ci",
5+
"UNIX_SOCKET_DIR": "tmp/cloudsql",
6+
"CLOUD_SQL_CONNECTION_NAME": "$INSTANCE_CONNECTION_NAME",
7+
"INSTANCE_UNIX_SOCKET": "$UNIX_SOCKET_DIR/$INSTANCE_CONNECTION_NAME",
8+
"DB_NAME": "kokoro_ci",
9+
"DB_USER": "kokoro_ci"
10+
},
11+
"secrets": {
12+
"DB_PASS": "nodejs-docs-samples-tests/nodejs-docs-samples-sql-password"
13+
}
14+
}

cloud-sql/sqlserver/tedious/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
},
1414
"scripts": {
1515
"start": "node server/server.js",
16-
"system-test": "c8 mocha -p -j 2 test/*.test.js --timeout=60000 --exit",
16+
"proxy": "$GITHUB_WORKSPACE/.github/workflows/utils/sql-proxy.sh",
17+
"system-test": "npm run proxy -- c8 mocha -p -j 2 test/*.test.js --timeout=60000 --exit",
1718
"test": "npm run system-test"
1819
},
1920
"dependencies": {

0 commit comments

Comments
 (0)