From 5e529900078f2aa3a71ca752dfd9a8a58a89b563 Mon Sep 17 00:00:00 2001 From: Thomas Howe Date: Wed, 2 Dec 2026 22:41:19 -0500 Subject: [PATCH] ci: use the docker compose plugin on the production build branch The test job on this branch still installs the standalone docker-compose from apt, which newer runner images no longer provide, so it fails at its first compose step without running a test. Apply the same change main made in #225: call the Compose v2 plugin the runner ships, check for it up front, and pin the runner image. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/run-tests.yml | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 3685315c..b1a7bae5 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -6,17 +6,19 @@ on: jobs: test: - runs-on: ubuntu-latest + # Pinned: ubuntu-latest moved to 26.04 between runs and broke this job without a code change. + # Move the pin on purpose, with a green run on the new image. + runs-on: ubuntu-24.04 steps: # Step 1: Check out the repository - name: Check out the repository uses: actions/checkout@v6 - - name: Set up Docker - run: | - sudo apt-get update - sudo apt-get install -y docker-compose + # Compose v2 ships with the runner as the `docker compose` plugin. The standalone v1 + # `docker-compose` from apt is gone on newer images; fail here, loudly, if the plugin is too. + - name: Check Docker Compose + run: docker compose version - name: Create .env file run: | @@ -29,11 +31,11 @@ jobs: - name: Build and run services with Docker Compose run: | - docker-compose up --build --detach + docker compose up --build --detach - name: Run tests inside Docker container run: | - docker-compose run --rm conserver bash -c " + docker compose run --rm conserver bash -c " pytest --maxfail=5 --disable-warnings --cov --cov-report=term-missing:skip-covered --cov-report=xml --cov-report=html " @@ -48,4 +50,4 @@ jobs: - name: Clean up if: always() - run: docker-compose down + run: docker compose down