From c183a8fa52c57a7edb9b93dc283399866dcd3929 Mon Sep 17 00:00:00 2001 From: eecavanna <134325062+eecavanna@users.noreply.github.com> Date: Thu, 17 Jul 2025 14:19:25 -0700 Subject: [PATCH 1/6] Update GHA workflow to workaround bug in third-party action --- .github/workflows/ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 196d780..1e89cd5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,6 +19,9 @@ jobs: with: enable-cache: true cache-dependency-glob: "uv.lock" + # Note: We added this `version: "latest"` to work around the following bug in this GHA: + # https://github.com/astral-sh/setup-uv/issues/489 + version: "latest" - name: Install the project run: uv sync --all-extras --dev From c62d466df1b5b5c8de3fbab4004543bd9dee09be Mon Sep 17 00:00:00 2001 From: eecavanna <134325062+eecavanna@users.noreply.github.com> Date: Thu, 17 Jul 2025 14:23:15 -0700 Subject: [PATCH 2/6] Update third-party `compose-action` GHA --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1e89cd5..a54d958 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,7 +36,7 @@ jobs: run: uv run pytest tests - name: Run tests in container environment - uses: hoverkraft-tech/compose-action@v2.2.0 + uses: hoverkraft-tech/compose-action@v2.3.0 env: ACTIONS_RUNNER_DEBUG: true with: From 70910bdab2c2eb68df908dff7c646c2ca58b8025 Mon Sep 17 00:00:00 2001 From: eecavanna <134325062+eecavanna@users.noreply.github.com> Date: Thu, 17 Jul 2025 14:27:47 -0700 Subject: [PATCH 3/6] Update Mongo container from `8.0.10` to `8.0.12` --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index febf6bb..f15ce35 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -20,7 +20,7 @@ services: - ".:/app" mongo: - image: mongo:8.0.10 + image: mongo:8.0.12 ports: # The environment variable can be specified either via an `.env` file, # or by defining it when invoking `docker compose`, like this: From c362f6df1f5d279a92c92f0988055443914bbfeb Mon Sep 17 00:00:00 2001 From: eecavanna <134325062+eecavanna@users.noreply.github.com> Date: Thu, 17 Jul 2025 14:29:13 -0700 Subject: [PATCH 4/6] Downgrade to latest non-RC version of Mongo --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index f15ce35..f93d5fe 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -20,7 +20,7 @@ services: - ".:/app" mongo: - image: mongo:8.0.12 + image: mongo:8.0.11 ports: # The environment variable can be specified either via an `.env` file, # or by defining it when invoking `docker compose`, like this: From 67b42c2fd8d446d9845e3e654cc9fef2f0abf0aa Mon Sep 17 00:00:00 2001 From: eecavanna <134325062+eecavanna@users.noreply.github.com> Date: Thu, 17 Jul 2025 14:37:40 -0700 Subject: [PATCH 5/6] Run `docker compose up` directory instead of via third-party GHA --- .github/workflows/ci.yml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a54d958..39aa039 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,10 +35,7 @@ jobs: - name: Run tests locally run: uv run pytest tests - - name: Run tests in container environment - uses: hoverkraft-tech/compose-action@v2.3.0 - env: - ACTIONS_RUNNER_DEBUG: true - with: - compose-file: "docker-compose.yml" - services: "test" + # Note: This spins up containers running the default services, + # and the services whose profile is "tools". + - name: Spin up Docker Compose stack + run: docker compose --profile tools up From e5a8125bfb9dee1c7c1bee3fc0e8945f3ffb2fda Mon Sep 17 00:00:00 2001 From: eecavanna <134325062+eecavanna@users.noreply.github.com> Date: Thu, 17 Jul 2025 14:44:17 -0700 Subject: [PATCH 6/6] Detach from everything except the `test` container --- .github/workflows/ci.yml | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 39aa039..68281a8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,7 +35,14 @@ jobs: - name: Run tests locally run: uv run pytest tests - # Note: This spins up containers running the default services, - # and the services whose profile is "tools". - - name: Spin up Docker Compose stack - run: docker compose --profile tools up + # Note: This spins up containers running the default services. + - name: Spin up Docker Compose stack in background + run: docker compose up --detach + + # Note: This spins up the "test" container. + - name: Spin up `test` container + run: docker compose up test + + # Note: This spins everything down. + - name: Spin down Docker Compose stack + run: docker compose down