From 5b5c6b934aadc16524a5d4f38304f8edc6ae033a Mon Sep 17 00:00:00 2001 From: Dominic Pelini Date: Mon, 21 Oct 2024 01:09:18 -0600 Subject: [PATCH] test fix --- .github/workflows/build-bindings.yml | 6 +++++- .github/workflows/tests.yml | 8 ++++---- package.json | 2 +- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-bindings.yml b/.github/workflows/build-bindings.yml index 6a5faba98..3644a1a44 100644 --- a/.github/workflows/build-bindings.yml +++ b/.github/workflows/build-bindings.yml @@ -158,7 +158,11 @@ jobs: # working-directory: test - name: Enable tests - run: echo "TEST_COMMAND=npm run ts-test -- --h 127.0.0.1 --port 3000" >> $GITHUB_ENV + run: echo "TEST_COMMAND=cd ts-test; + npm install typescript --save-dev; + npx tsc; + cd ..; + npm run ts-test -- --h 127.0.0.1 --port 3000" >> $GITHUB_ENV # - name: Disable tests (only run basic import test) # if: ${{ !inputs.run_tests }} diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 7b779b897..782e5b495 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -217,7 +217,7 @@ jobs: - name: Run Aerospike server if: ${{ !contains(github.event.pull_request.labels.*.name, 'new-server-features') }} - run: docker run -d -v $(pwd)/.github/assets/aerospike.conf:/etc/aerospike/aerospike.conf --name aerospike -p 3000-3002:3000-3002 aerospike/aerospike-server + run: docker run -d -v $(pwd)/.github/assets/aerospike.conf:/etc/aerospike/aerospike.conf --name aerospike -p 3000-3002:3000-3002 aerospike/aerospike-server --config-file /etc/aerospike/aerospike.conf - name: Wait for database to be ready # Should be ready after 3 seconds @@ -332,8 +332,8 @@ jobs: npm install typescript --save-dev; npx tsc; cd ..; - npm run ts-test ts-test -- --h localhost --U admin --P admin --t 40000 tests/admin.js - + npm run ts-test tests/admin.js -- --h localhost --U admin --P admin --t 40000 +test-ee test-valgrind: runs-on: ubuntu-latest needs: build-ubuntu @@ -387,7 +387,7 @@ jobs: - name: Run Aerospike server if: ${{ !contains(github.event.pull_request.labels.*.name, 'new-server-features') }} - run: docker run -d -v $(pwd)/.github/assets/aerospike.conf:/etc/aerospike/aerospike.conf --name aerospike -p 3000-3002:3000-3002 aerospike/aerospike-server + run: docker run -d -v $(pwd)/.github/assets/aerospike.conf:/etc/aerospike/aerospike.conf --name aerospike -p 3000-3002:3000-3002 aerospike/aerospike-server - name: Wait for database to be ready # Should be ready after 3 seconds diff --git a/package.json b/package.json index 7f67fff29..3057e2272 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,7 @@ "install": "npm run build", "build": "node-pre-gyp install --fallback-to-build", "test": "mocha test", - "ts-test": "rm -rf ts-test/dist; cd ts-test; npx tsc ; cp tests/udf.lua dist/udf.lua ; mocha dist", + "ts-test": "rm -rf ts-test/dist; cd ts-test; npx tsc ; cp tests/udf.lua dist/udf.lua ; mocha dist/", "test-dry-run": "mocha --dry-run", "test-noserver": "GLOBAL_CLIENT=false mocha -g '#noserver'", "lint": "standard",