Add support for testing in a container

This commit is contained in:
Mahesh Bandara Wijerathna
2023-02-11 06:15:02 +05:30
parent 3aa7efaf38
commit 8ce88f398f
4 changed files with 33 additions and 0 deletions
+10
View File
@@ -0,0 +1,10 @@
# IDEs
.idea
# Node
node_modules
# Project
.github
benchmark
docs
+14
View File
@@ -0,0 +1,14 @@
FROM nikolaik/python-nodejs:python3.11-nodejs18-slim
RUN apt-get update
RUN apt-get install -y build-essential
WORKDIR /bs3mc
COPY package.json .
RUN npm install --ignore-scripts --no-audit
COPY . .
RUN npm run build-debug
CMD ["npm", "test"]
+8
View File
@@ -0,0 +1,8 @@
version: "3"
services:
bs3mc-test:
build: .
image: m4heshd/bs3mc-test
container_name: bs3mc-test
restart: "no"
+1
View File
@@ -44,6 +44,7 @@
"rebuild-release": "npm run lzz && npm run build-release",
"rebuild-debug": "npm run lzz && npm run build-debug",
"test": "mocha --exit --slow=75 --timeout=30000",
"test:container": "docker-compose up --detach --build",
"benchmark": "node benchmark",
"download": "bash ./deps/download.sh",
"setup": "powershell ./deps/setup.ps1",