Skip to content

Commit

Permalink
chore: add npm scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
weyoss committed Nov 20, 2023
1 parent 3e84387 commit 34b4883
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 0 deletions.
16 changes: 16 additions & 0 deletions scripts/benchmark.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#
# Copyright (c)
# Weyoss <weyoss@protonmail.com>
# https://github.com/weyoss
#
# This source code is licensed under the MIT license found in the LICENSE file
# in the root directory of this source tree.
#

set -x
set -e

[ ! -d "misc/benchmarks" ] && exit 0
cd misc/benchmarks
sudo docker-compose down --remove-orphans
sudo docker-compose run -e TM=5000 benchmark-runner
18 changes: 18 additions & 0 deletions scripts/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#
# Copyright (c)
# Weyoss <weyoss@protonmail.com>
# https://github.com/weyoss
#
# This source code is licensed under the MIT license found in the LICENSE file
# in the root directory of this source tree.
#

set -x
set -e

npm run type-coverage
npm run lint
npm run format
rm -rf dist
tsc
cp -r src/common/redis-client/lua dist/src/common/redis-client/
20 changes: 20 additions & 0 deletions scripts/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#
# Copyright (c)
# Weyoss <weyoss@protonmail.com>
# https://github.com/weyoss
#
# This source code is licensed under the MIT license found in the LICENSE file
# in the root directory of this source tree.
#

set -x
set -e

export NODE_ENV=test
npm run build
cat >dist/package.json <<!EOF
{
"type": "commonjs"
}
!EOF
jest --runInBand --verbose --collectCoverage "$@"

0 comments on commit 34b4883

Please sign in to comment.