Add a buildbot dir and a script for local testing

This commit is contained in:
Lee Miller 2023-01-03 05:05:12 +02:00
parent be6a307248
commit c10e2830f5
Signed by untrusted user: lee.miller
GPG Key ID: 4F97A5EA88F4AB63
4 changed files with 25 additions and 0 deletions

13
.buildbot/node/Dockerfile Normal file
View File

@ -0,0 +1,13 @@
FROM node:16
RUN apt-get update
RUN apt-get install -yq --no-install-suggests --no-install-recommends xauth xvfb
WORKDIR /app
ADD src ./src
COPY package*.json binding.gyp ./
RUN npm install
# RUN npm audit fix
COPY . .

6
.buildbot/node/build.sh Normal file
View File

@ -0,0 +1,6 @@
#!/bin/sh
mkdir -p ../out
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 bitmessage-js -f .buildbot/node/Dockerfile .
docker run -it --rm bitmessage-js:latest .buildbot/node/test.sh