Skip to content

Commit

Permalink
test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
DomPeliniAerospike committed Oct 21, 2024
1 parent 882fc4b commit ed13719
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 58 deletions.
114 changes: 57 additions & 57 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
# 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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit ed13719

Please sign in to comment.