From 305556fa1239aeda8dcc07ad591f5506eaa7f7e8 Mon Sep 17 00:00:00 2001 From: Mendy Man Date: Mon, 20 Jan 2025 09:13:46 -0500 Subject: [PATCH 1/2] ci: Switch python tests to use public release image --- .github/workflows/python-tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python-tests.yml b/.github/workflows/python-tests.yml index d339645be..2a5799938 100644 --- a/.github/workflows/python-tests.yml +++ b/.github/workflows/python-tests.yml @@ -20,8 +20,8 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Build svix server image - run: docker compose build + - name: Pull svix server image (and dependencies) + run: docker compose pull working-directory: ./server - uses: actions/setup-python@v5 From 3833469b32eccae16b3f97048aeac19ff50390ab Mon Sep 17 00:00:00 2001 From: Mendy Man Date: Mon, 20 Jan 2025 10:46:26 -0500 Subject: [PATCH 2/2] python: Disable the `--build` option in `pytest-docker` --- python/tests/conftest.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/python/tests/conftest.py b/python/tests/conftest.py index 0ff3d4cd3..88a330065 100644 --- a/python/tests/conftest.py +++ b/python/tests/conftest.py @@ -50,6 +50,7 @@ def docker_compose_command(): # fallback on v1 otherwise return "docker-compose" + # `pytest-docker` reads this to override the location of the docker-compose.yml file @pytest.fixture(scope="session") def docker_compose_file(): return [ @@ -57,6 +58,12 @@ def docker_compose_file(): os.path.join(os.path.dirname(__file__), "docker-compose.override.yml"), ] + # `pytest-docker` will use this fixture to override the setup command + @pytest.fixture(scope="session") + def docker_setup(): + # Don't include the default --build option in the setup + return ["up -d"] + @pytest.fixture(scope="session") def docker_compose(docker_services): return docker_services._docker_compose