Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
build: add oracle to CI (#6623)
* build: add oracle to build database services

* only enable test 1972 for MySQL

* disable github issue 3118 for oracle
  • Loading branch information
imnotjames committed Sep 4, 2020
1 parent 23110d1 commit fa21f87
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 2 deletions.
25 changes: 25 additions & 0 deletions .circleci/config.yml
Expand Up @@ -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" }}
Expand Down Expand Up @@ -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"
6 changes: 6 additions & 0 deletions docker-compose.yml
Expand Up @@ -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"
Expand Down
7 changes: 5 additions & 2 deletions ormconfig.circleci-common.json
Expand Up @@ -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"
}
}
]
6 changes: 6 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions test/github-issues/1972/issue-1972.ts
Expand Up @@ -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));
Expand Down
1 change: 1 addition & 0 deletions test/github-issues/3118/issue-3118.ts
Expand Up @@ -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));
Expand Down

0 comments on commit fa21f87

Please sign in to comment.