diff --git a/package.json b/package.json index cd4697b0..c6efc49d 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,7 @@ "test:js": "mocha test/**_test.js", "lint": "standard lib/**.js test/**.js tasks/**js", "publish": "node tasks/publish.js", - "test:update-linux-reference": "docker build -f test/Dockerfile -t asciidoctor-web-pdf/test . && docker run --name asciidoctorwebpdftest asciidoctor-web-pdf/test:latest && docker cp asciidoctorwebpdftest:/app/test/output ./test/reference/linux/" + "test:update-linux-reference": "docker build -f test/Dockerfile -t asciidoctor-web-pdf/test . && docker run --name asciidoctorwebpdftest asciidoctor-web-pdf/test:latest; docker cp asciidoctorwebpdftest:/app/test/output/. ./test/reference/linux/ && docker rm asciidoctorwebpdftest" }, "repository": { "type": "git", diff --git a/test/Dockerfile b/test/Dockerfile index 22755998..671e798d 100644 --- a/test/Dockerfile +++ b/test/Dockerfile @@ -9,14 +9,14 @@ RUN apt-get update \ USER asciidoc WORKDIR /app +COPY --chown=asciidoc:asciidoc package.json package-lock.json ./ +RUN npm ci && npm cache clean --force + COPY --chown=asciidoc:asciidoc lib ./lib COPY --chown=asciidoc:asciidoc bin ./bin COPY --chown=asciidoc:asciidoc css ./css COPY --chown=asciidoc:asciidoc fonts ./fonts COPY --chown=asciidoc:asciidoc test ./test -COPY --chown=asciidoc:asciidoc package.json package-lock.json ./ -RUN npm ci - ENV DEBUG=1 CMD npm t