Skip to content

Commit 65d6961

Browse files
committed
set memory limits in github cicd
1 parent b0cbe2d commit 65d6961

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

tests/conftest.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,15 @@ def container(client: docker.DockerClient) -> Generator[Container, None, None]:
4848
lib_path: {"bind": "/var/jenkins_home/pipeline-library", "mode": "rw"},
4949
}
5050

51+
run_time_args = {}
52+
53+
if 'GITHUB_ACTIONS' in os.environ:
54+
run_time_args['mem_limit'] = '6g'
55+
run_time_args['mem_reservation'] = '4g'
56+
run_time_args['memswap_limit'] = '4g'
57+
5158
container = client.containers.run(
52-
image.id, tty=True, detach=True, volumes=volumes, privileged=True
59+
image.id, tty=True, detach=True, volumes=volumes, privileged=True, **run_time_args
5360
)
5461

5562
# We should really do some kinda check to see if docker daemon is up and running =/

0 commit comments

Comments
 (0)