mirror of
https://gitea.com/docker/build-push-action.git
synced 2024-11-25 10:59:38 +01:00
test: move envs to jest config
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
parent
d1b0eb0a29
commit
67109bc4b2
2 changed files with 10 additions and 4 deletions
|
@ -66,10 +66,6 @@ FROM docker:${DOCKER_VERSION} as docker
|
||||||
FROM docker/buildx-bin:${BUILDX_VERSION} as buildx
|
FROM docker/buildx-bin:${BUILDX_VERSION} as buildx
|
||||||
|
|
||||||
FROM deps AS test
|
FROM deps AS test
|
||||||
ENV RUNNER_TEMP=/tmp/github_runner
|
|
||||||
ENV RUNNER_TOOL_CACHE=/tmp/github_tool_cache
|
|
||||||
ENV GITHUB_REPOSITORY=docker/build-push-action
|
|
||||||
ENV GITHUB_RUN_ID=123456789
|
|
||||||
RUN --mount=type=bind,target=.,rw \
|
RUN --mount=type=bind,target=.,rw \
|
||||||
--mount=type=cache,target=/src/node_modules \
|
--mount=type=cache,target=/src/node_modules \
|
||||||
--mount=type=bind,from=docker,source=/usr/local/bin/docker,target=/usr/bin/docker \
|
--mount=type=bind,from=docker,source=/usr/local/bin/docker,target=/usr/bin/docker \
|
||||||
|
|
|
@ -1,5 +1,15 @@
|
||||||
|
process.env = Object.assign({}, process.env, {
|
||||||
|
RUNNER_TEMP: '/tmp/github_runner',
|
||||||
|
RUNNER_TOOL_CACHE: '/tmp/github_tool_cache',
|
||||||
|
GITHUB_REPOSITORY: 'docker/build-push-action',
|
||||||
|
GITHUB_RUN_ID: '123456789'
|
||||||
|
}) as {
|
||||||
|
[key: string]: string;
|
||||||
|
};
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
clearMocks: false,
|
clearMocks: false,
|
||||||
|
testEnvironment: 'node',
|
||||||
moduleFileExtensions: ['js', 'ts'],
|
moduleFileExtensions: ['js', 'ts'],
|
||||||
setupFiles: ['dotenv/config'],
|
setupFiles: ['dotenv/config'],
|
||||||
testMatch: ['**/*.test.ts'],
|
testMatch: ['**/*.test.ts'],
|
||||||
|
|
Loading…
Reference in a new issue