diff --git a/.circleci/config.yml b/.circleci/config.yml index 9c4526781..58256e0dd 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -51,6 +51,24 @@ commands: if [ ! -d node_modules ]; then npm install fi + - run: + # This is pretty terrible but OracleDB requires you to grab the binaries OOB + # from the normal installation, place them in the LD Path + # also - not super well documented - grab `libaio` as well + # Because this is technically the same image as the runner we'll snag + # the libaio1 and place them in the same instantclient directory. + name: Download Required OracleDB Binaries + command: | + if [ ! -d node_modules/oracledb/instantclient_19_8 ]; then + curl -sf -o node_modules/oracledb/instantclient.zip $BLOB_URL + unzip -qqo node_modules/oracledb/instantclient.zip -d node_modules/oracledb/ + rm node_modules/oracledb/instantclient.zip + + DEBIAN_FRONTEND=noninteractive sudo apt-get -qq -y install libaio1 + cp /lib/*/libaio.so.* node_modules/oracledb/instantclient_19_8/ + fi + environment: + BLOB_URL: https://download.oracle.com/otn_software/linux/instantclient/19800/instantclient-basiclite-linux.x64-19.8.0.0.0dbru.zip - save_cache: name: Save node_modules cache key: node_modules-{{ checksum "package-lock.json" }} @@ -188,3 +206,10 @@ workflows: - build databases: "cockroachdb" node-version: "12" + - test: + name: test (oracle) - Node v12 + requires: + - lint + - build + databases: "oracle" + node-version: "12" diff --git a/docker-compose.yml b/docker-compose.yml index 0ee126dc3..47415bce4 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -68,6 +68,12 @@ services: ports: - "26257:26257" + oracle: + image: imnotjames/oracle-xe:18 + container_name: "typeorm-oracle" + ports: + - "1521:1521" + # sap hana (works only on linux) # hanaexpress: # image: "store/saplabs/hanaexpress:2.00.040.00.20190729.1" diff --git a/ormconfig.circleci-common.json b/ormconfig.circleci-common.json index ef62fa1ac..d9f558a78 100644 --- a/ormconfig.circleci-common.json +++ b/ormconfig.circleci-common.json @@ -103,9 +103,12 @@ "type": "oracle", "host": "typeorm-oracle", "port": 1521, - "sid": "xe", + "sid": "XE", "username": "system", "password": "oracle", - "logging": false + "logging": false, + "extra": { + "connectString": "typeorm-oracle:1521/XE" + } } ] diff --git a/package-lock.json b/package-lock.json index e100be4b4..319bc470a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7674,6 +7674,12 @@ "wordwrap": "~1.0.0" } }, + "oracledb": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/oracledb/-/oracledb-5.0.0.tgz", + "integrity": "sha512-NLE3t6KiAkpBHA1/zgjNiKaa9Z4Nnp4PuB3d0b3Kz4C8klrIrMKfHIGUySlwqgDW588m7/2hnPxU7PH6wjBd6g==", + "dev": true + }, "ordered-read-streams": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/ordered-read-streams/-/ordered-read-streams-1.0.1.tgz", diff --git a/package.json b/package.json index 7890bcf58..a0c3fbd2a 100644 --- a/package.json +++ b/package.json @@ -89,6 +89,7 @@ "mssql": "^4.3.2", "mysql": "^2.15.0", "mysql2": "^1.6.5", + "oracledb": "^5.0.0", "pg": "^8.3.0", "redis": "^2.8.0", "remap-istanbul": "^0.13.0", diff --git a/test/github-issues/1972/issue-1972.ts b/test/github-issues/1972/issue-1972.ts index 0b957b973..df65ea747 100644 --- a/test/github-issues/1972/issue-1972.ts +++ b/test/github-issues/1972/issue-1972.ts @@ -10,6 +10,7 @@ describe("github issues > #1972 STI problem - empty columns", () => { before(async () => connections = await createTestingConnections({ entities: [__dirname + "/entity/*{.js,.ts}"], + enabledDrivers: ['mysql'] })); beforeEach(() => reloadTestingDatabases(connections)); diff --git a/test/github-issues/3118/issue-3118.ts b/test/github-issues/3118/issue-3118.ts index 001e358e6..de30cc7aa 100644 --- a/test/github-issues/3118/issue-3118.ts +++ b/test/github-issues/3118/issue-3118.ts @@ -18,6 +18,7 @@ describe("github issues > #3118 shorten alias names (for RDBMS with a limit) whe let connections: Connection[]; before(async () => connections = await createTestingConnections({ entities: [__dirname + "/entity/*{.js,.ts}"], + enabledDrivers: ["mysql", "postgres", "cockroachdb", "sap", "mariadb", "mssql"] })); beforeEach(() => reloadTestingDatabases(connections)); after(() => closeTestingConnections(connections));