Try to run the existing tests in buildbot,

docker-test.sh - is an alternative script to run locally.
This commit is contained in:
Lee Miller 2022-12-23 23:21:06 +02:00
parent a4f4a5f85e
commit 7946c2ff2e
Signed by: lee.miller
GPG Key ID: 4F97A5EA88F4AB63
4 changed files with 25 additions and 0 deletions

14
.buildbot/node/Dockerfile Normal file
View File

@ -0,0 +1,14 @@
FROM node:16
RUN apt-get update
RUN apt-get install -yq --no-install-suggests --no-install-recommends xauth xvfb
WORKDIR /app
COPY package*.json binding.gyp *.cc ./
RUN npm install
RUN npm audit fix
RUN mkdir -p ../out
COPY . .

5
.buildbot/node/build.sh Executable file
View File

@ -0,0 +1,5 @@
#!/bin/sh
cp package*.json ../out
npm pack && mv *.tgz ../out/

3
.buildbot/node/test.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/sh
npm test

3
docker-test.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/sh
docker build --tag eccrypto -f .buildbot/node/Dockerfile .
docker run -it --rm eccrypto:latest .buildbot/node/test.sh