Merge pull request #760 from crazy-max/test-envs
Some checks failed
example / docker (push) Has been cancelled
e2e / docker (AWS_SECRET_ACCESS_KEY, 175142243308.dkr.ecr.us-east-2.amazonaws.com, 175142243308.dkr.ecr.us-east-2.amazonaws.com/sandbox/test-docker-action, AWS_ACCESS_KEY_ID) (push) Has been cancelled
e2e / docker (AWS_SECRET_ACCESS_KEY, public.ecr.aws, public.ecr.aws/q3b5f1u4/test-docker-action, AWS_ACCESS_KEY_ID) (push) Has been cancelled
e2e / docker (AZURE_CLIENT_SECRET, officialgithubactions.azurecr.io, officialgithubactions.azurecr.io/test-docker-action, AZURE_CLIENT_ID) (push) Has been cancelled
e2e / docker (DOCKERHUB_TOKEN, , ghactionstest/ghactionstest, DOCKERHUB_USERNAME) (push) Has been cancelled
e2e / docker (GAR_JSON_KEY, us-east4-docker.pkg.dev, us-east4-docker.pkg.dev/sandbox-298914/docker-official-github-actions/test-docker-action, GAR_USERNAME) (push) Has been cancelled
e2e / docker (GCR_JSON_KEY, gcr.io, gcr.io/sandbox-298914/test-docker-action, GCR_USERNAME) (push) Has been cancelled
e2e / docker (GHCR_PAT, ghcr.io, ghcr.io/docker-ghactiontest/test, GHCR_USERNAME) (push) Has been cancelled
e2e / docker (GITLAB_TOKEN, registry.gitlab.com, registry.gitlab.com/test1716/test, GITLAB_USERNAME) (push) Has been cancelled

test: move envs to jest config
This commit is contained in:
CrazyMax
2023-01-13 13:27:37 +01:00
committed by GitHub
2 changed files with 10 additions and 4 deletions

View File

@@ -66,10 +66,6 @@ FROM docker:${DOCKER_VERSION} as docker
FROM docker/buildx-bin:${BUILDX_VERSION} as buildx
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 \
--mount=type=cache,target=/src/node_modules \
--mount=type=bind,from=docker,source=/usr/local/bin/docker,target=/usr/bin/docker \

View File

@@ -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 = {
clearMocks: false,
testEnvironment: 'node',
moduleFileExtensions: ['js', 'ts'],
setupFiles: ['dotenv/config'],
testMatch: ['**/*.test.ts'],