Skip to content

Commit f2ce3f9

Browse files
Add ONgDB CI workflow and update Client tests for version compatibility
1 parent ff7de32 commit f2ce3f9

2 files changed

Lines changed: 46 additions & 1 deletion

File tree

.github/workflows/ongdb.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Tests with ONgDB
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened, ready_for_review]
6+
branches: [master]
7+
8+
jobs:
9+
ongdb-tests:
10+
if: ${{ github.event.pull_request.draft == false }}
11+
runs-on: ubuntu-latest
12+
name: Run Jest tests
13+
14+
services:
15+
ongdb:
16+
image: graphfoundation/ongdb-enterprise:1.0.6
17+
env:
18+
ONGDB_AUTH: ongdb/password
19+
ports:
20+
- 7687:7687
21+
- 7474:7474
22+
options: >-
23+
--health-cmd "wget http://localhost:7474 || exit 1"
24+
25+
steps:
26+
- name: Checkout
27+
uses: actions/checkout@v6
28+
29+
- name: Setup node
30+
uses: actions/setup-node@v6
31+
with:
32+
node-version: 'lts/*'
33+
34+
- name: npm install
35+
run: npm ci
36+
37+
- name: jest run test
38+
env:
39+
BOLT_HOST: localhost
40+
BOLT_PORT: 7687
41+
BOLT_AUTH_SCHEME: basic
42+
BOLT_USER: ongdb
43+
BOLT_PASSWORD: password
44+
BOLT_VERSION: '1'
45+
run: npm run test:client

tests/helpers/Client.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ describe('Client', () => {
6060
});
6161
});
6262

63-
describe('beginTransaction()', () => {
63+
(VERSION && parseInt(VERSION.split('.')[0], 10) < 3 ? describe.skip : describe)('beginTransaction()', () => {
6464
test('returns a successful response', async () => {
6565
const resp = await client.beginTransaction();
6666
expect(resp.isSuccess).toBe(true);

0 commit comments

Comments
 (0)