0
0
mirror of https://github.com/crazy-max/diun.git synced 2024-11-22 15:22:34 +00:00
crazy-max_diun/test/dockerfile1/mount/Dockerfile2
CrazyMax ac2e41de80
Add e2e tests (#471)
Co-authored-by: CrazyMax <crazy-max@users.noreply.github.com>
2021-08-21 14:09:06 +02:00

26 lines
833 B
Plaintext

# syntax=docker/dockerfile:1.2
ARG NODE_VERSION
# foo
# diun:"watch_repo=true,max_tags=100"
FROM node:${NODE_VERSION}-alpine AS base
RUN apk add --no-cache git
WORKDIR /src
FROM base AS deps
RUN --mount=type=bind,target=.,rw \
--mount=type=cache,target=/src/node_modules \
yarn install
FROM deps AS test
ENV RUNNER_TEMP=/tmp/github_runner
ENV RUNNER_TOOL_CACHE=/tmp/github_tool_cache
RUN --mount=type=bind,target=.,rw \
--mount=type=cache,target=/src/node_modules \
--mount=type=bind,from=crazymax/docker,source=/usr/libexec/docker/cli-plugins/docker-buildx,target=/usr/libexec/docker/cli-plugins/docker-buildx \
--mount=type=bind,from=crazymax/docker,source=/usr/local/bin/docker,target=/usr/bin/docker \
yarn run test --coverageDirectory=/tmp/coverage
FROM scratch AS test-coverage
COPY --from=test /tmp/coverage /