From ed137193af9b676edb87f2e26175e35289ae9b69 Mon Sep 17 00:00:00 2001 From: Dominic Pelini Date: Mon, 21 Oct 2024 00:30:53 -0600 Subject: [PATCH] test fix --- .github/workflows/tests.yml | 114 ++++++++++++++++++------------------ package.json | 2 +- 2 files changed, 58 insertions(+), 58 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 92ae8057..a90d7798 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 .github/assets:/opt/aerospike/etc --name aerospike -p 3000-3002:3000-3002 --config-file /opt/aerospike/etc/aerospike.conf aerospike/aerospike-server + run: docker run -d -v .github/assets:/opt/aerospike/etc --name aerospike -p 3000-3002:3000-3002 --config-file /opt/aerospike/etc/aerospike.conf aerospike/aerospike-server:7.1 - name: Wait for database to be ready # Should be ready after 3 seconds @@ -322,7 +322,7 @@ jobs: run: sleep 5 - name: Run tests - run: npm run test -- --h localhost --U admin --P admin --t 40000 test/admin.js + run: npm run ts-test -- --h localhost --U admin --P admin --t 40000 tests/admin.js test-valgrind: runs-on: ubuntu-latest @@ -386,58 +386,58 @@ jobs: - name: Run tests run: npm run valgrind -- --t 40000 - test-typescript: - runs-on: ubuntu-latest - needs: build-ubuntu - strategy: - matrix: - node-version: [ - "20", - ] - fail-fast: false - - steps: - - uses: actions/checkout@v2 - with: - submodules: recursive - - - uses: actions/setup-node@v4 - with: - node-version: ${{ matrix.node-version }} - architecture: 'x64' - - - uses: actions/download-artifact@v4 - with: - name: binding-${{ matrix.node-version }} - - - name: make binding folder - run: mkdir lib/binding - - - name: Install client - run: | - cp -r node-v115-linux-x64 lib/binding/node-v115-linux-x64 - - - if: ${{ contains(github.event.pull_request.labels.*.name, 'new-server-features') }} - uses: docker/login-action@v3 - with: - username: ${{ secrets.DOCKER_HUB_BOT_USERNAME }} - password: ${{ secrets.DOCKER_HUB_BOT_PW }} - - - name: Run Aerospike server release candidate with latest tag - if: ${{ contains(github.event.pull_request.labels.*.name, 'new-server-features') }} - run: docker run -d --name aerospike -p 3000-3002:3000-3002 aerospike/aerospike-server-rc:latest - - - name: Run Aerospike server - if: ${{ !contains(github.event.pull_request.labels.*.name, 'new-server-features') }} - run: docker run -d --name aerospike -p 3000-3002:3000-3002 aerospike/aerospike-server - - - name: Modify the package.json - run: | - mkdir my-aerospike-project - cd my-aerospike-project - npm init -y - npm install typescript ts-node --save-dev - npm install .. - cp ../examples/typescript.ts index.ts - npx tsc index.ts - node index.js \ No newline at end of file +# test-typescript: +# runs-on: ubuntu-latest +# needs: build-ubuntu +# strategy: +# matrix: +# node-version: [ +# "20", +# ] +# fail-fast: false +# +# steps: +# - uses: actions/checkout@v2 +# with: +# submodules: recursive +# +# - uses: actions/setup-node@v4 +# with: +# node-version: ${{ matrix.node-version }} +# architecture: 'x64' +# +# - uses: actions/download-artifact@v4 +# with: +# name: binding-${{ matrix.node-version }} +# +# - name: make binding folder +# run: mkdir lib/binding +# +# - name: Install client +# run: | +# cp -r node-v115-linux-x64 lib/binding/node-v115-linux-x64 +# +# - if: ${{ contains(github.event.pull_request.labels.*.name, 'new-server-features') }} +# uses: docker/login-action@v3 +# with: +# username: ${{ secrets.DOCKER_HUB_BOT_USERNAME }} +# password: ${{ secrets.DOCKER_HUB_BOT_PW }} +# +# - name: Run Aerospike server release candidate with latest tag +# if: ${{ contains(github.event.pull_request.labels.*.name, 'new-server-features') }} +# run: docker run -d --name aerospike -p 3000-3002:3000-3002 aerospike/aerospike-server-rc:latest +# +# - name: Run Aerospike server +# if: ${{ !contains(github.event.pull_request.labels.*.name, 'new-server-features') }} +# run: docker run -d --name aerospike -p 3000-3002:3000-3002 aerospike/aerospike-server +# +# - name: Modify the package.json +# run: | +# mkdir my-aerospike-project +# cd my-aerospike-project +# npm init -y +# npm install typescript ts-node --save-dev +# npm install .. +# cp ../examples/typescript.ts index.ts +# npx tsc index.ts +# node index.js \ No newline at end of file diff --git a/package.json b/package.json index 0919a3f2..7f67fff2 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; 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",