diff --git a/.buildbot/node/Dockerfile b/.buildbot/node/Dockerfile new file mode 100644 index 0000000..6c9dde4 --- /dev/null +++ b/.buildbot/node/Dockerfile @@ -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 . . diff --git a/.buildbot/node/build.sh b/.buildbot/node/build.sh new file mode 100755 index 0000000..1d8a062 --- /dev/null +++ b/.buildbot/node/build.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +cp package*.json ../out + +npm pack && mv *.tgz ../out/ diff --git a/.buildbot/node/test.sh b/.buildbot/node/test.sh new file mode 100755 index 0000000..b41801e --- /dev/null +++ b/.buildbot/node/test.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +npm test diff --git a/docker-test.sh b/docker-test.sh new file mode 100755 index 0000000..0057d6b --- /dev/null +++ b/docker-test.sh @@ -0,0 +1,3 @@ +#!/bin/sh +docker build --tag eccrypto -f .buildbot/node/Dockerfile . +docker run -it --rm eccrypto:latest .buildbot/node/test.sh