From 5c02839b9c33938c6a72458fe165bb3a5b4c8847 Mon Sep 17 00:00:00 2001 From: burnysc2 Date: Tue, 17 Dec 2024 16:45:53 +0100 Subject: [PATCH] Fix docker-ci --- .github/workflows/docker-ci.yml | 7 ++++++- dockerfiles/test_docker_image.sh | 3 ++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-ci.yml b/.github/workflows/docker-ci.yml index ebac3612..f84ae9a5 100644 --- a/.github/workflows/docker-ci.yml +++ b/.github/workflows/docker-ci.yml @@ -103,10 +103,15 @@ jobs: echo "Start container, override the default entrypoint" docker run -i -d \ --name test_container \ - --mount type=bind,source="$(pwd)",destination=/root/python-sc2,readonly \ --entrypoint /bin/bash \ $IMAGE_NAME-v$VERSION_NUMBER-squashed echo "Install python-sc2" + docker exec -i test_container mkdir -p /root/python-sc2 + docker cp pyproject.toml test_container:/root/python-sc2/ + docker cp uv.lock test_container:/root/python-sc2/ + docker cp sc2 test_container:/root/python-sc2/sc2 + docker cp test test_container:/root/python-sc2/test + docker cp examples test_container:/root/python-sc2/examples docker exec -i test_container bash -c "pip install uv \ && cd python-sc2 && uv sync --frozen --no-cache --no-install-project" echo "Run various test bots" diff --git a/dockerfiles/test_docker_image.sh b/dockerfiles/test_docker_image.sh index 23313283..439a7899 100644 --- a/dockerfiles/test_docker_image.sh +++ b/dockerfiles/test_docker_image.sh @@ -35,6 +35,7 @@ docker rm -f test_container # Start container, override the default entrypoint docker run -i -d \ --name test_container \ + --entrypoint /bin/bash \ $IMAGE_NAME docker exec -i test_container mkdir -p /root/python-sc2 @@ -44,7 +45,7 @@ docker cp sc2 test_container:/root/python-sc2/sc2 docker cp test test_container:/root/python-sc2/test # Install python-sc2, via mount the python-sc2 folder will be available -docker exec -i test_container bash -c "cd /root/python-sc2 && uv sync --no-cache --no-install-project" +docker exec -i test_container bash -c "pip install uv && cd python-sc2 && uv sync --no-cache --no-install-project" # Run various test bots docker exec -i test_container bash -c "cd python-sc2 && uv run python test/travis_test_script.py test/autotest_bot.py"