Skip to content

Commit 37abced

Browse files
authored
Merge pull request #760 from crazy-max/test-envs
test: move envs to jest config
2 parents d1b0eb0 + 67109bc commit 37abced

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

dev.Dockerfile

-4
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,6 @@ FROM docker:${DOCKER_VERSION} as docker
6666
FROM docker/buildx-bin:${BUILDX_VERSION} as buildx
6767

6868
FROM deps AS test
69-
ENV RUNNER_TEMP=/tmp/github_runner
70-
ENV RUNNER_TOOL_CACHE=/tmp/github_tool_cache
71-
ENV GITHUB_REPOSITORY=docker/build-push-action
72-
ENV GITHUB_RUN_ID=123456789
7369
RUN --mount=type=bind,target=.,rw \
7470
--mount=type=cache,target=/src/node_modules \
7571
--mount=type=bind,from=docker,source=/usr/local/bin/docker,target=/usr/bin/docker \

jest.config.ts

+10
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
1+
process.env = Object.assign({}, process.env, {
2+
RUNNER_TEMP: '/tmp/github_runner',
3+
RUNNER_TOOL_CACHE: '/tmp/github_tool_cache',
4+
GITHUB_REPOSITORY: 'docker/build-push-action',
5+
GITHUB_RUN_ID: '123456789'
6+
}) as {
7+
[key: string]: string;
8+
};
9+
110
module.exports = {
211
clearMocks: false,
12+
testEnvironment: 'node',
313
moduleFileExtensions: ['js', 'ts'],
414
setupFiles: ['dotenv/config'],
515
testMatch: ['**/*.test.ts'],

0 commit comments

Comments
 (0)