From f4be98d917863ccfdb9c3b7e8060fcce01b2a201 Mon Sep 17 00:00:00 2001 From: Jose <75870284+Jaro-c@users.noreply.github.com> Date: Tue, 9 Jun 2026 19:05:43 -0500 Subject: [PATCH] feat(rust-ci): add podman input to start rootless Podman socket (#25) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary - Adds optional boolean `podman` input (default: `false`) to `rust-ci.yml` - When `true`, the coverage job starts the rootless Podman socket before running tests and sets `PODMAN_SOCKET` so integration tests can connect - Applies only to `ubuntu-latest` (the coverage job runner) ## Test plan - [ ] Merge this PR - [ ] In a downstream repo, set `podman: true` in the `rust-ci` call — confirm the Podman socket starts and integration tests that use `bollard` connect via `PODMAN_SOCKET` Signed-off-by: Jaro-c <75870284+Jaro-c@users.noreply.github.com> --- .github/workflows/rust-ci.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/workflows/rust-ci.yml b/.github/workflows/rust-ci.yml index 46800f1..d188271 100644 --- a/.github/workflows/rust-ci.yml +++ b/.github/workflows/rust-ci.yml @@ -15,6 +15,10 @@ on: description: JSON array of extra runner images to also run tests on (e.g. '["macos-latest"]') type: string default: "[]" + podman: + description: Start rootless Podman socket before running the coverage job (ubuntu-latest only) + type: boolean + default: false permissions: contents: read @@ -138,7 +142,17 @@ jobs: - name: Install cargo-llvm-cov run: command -v cargo-llvm-cov >/dev/null || cargo install cargo-llvm-cov --locked + - name: Start Podman socket + if: inputs.podman + id: podman-socket + run: | + systemctl --user start podman.socket + until [ -S "/run/user/$(id -u)/podman/podman.sock" ]; do sleep 0.1; done + echo "path=unix:///run/user/$(id -u)/podman/podman.sock" >> "$GITHUB_OUTPUT" + - name: Coverage gate + env: + PODMAN_SOCKET: ${{ steps.podman-socket.outputs.path }} run: | cargo llvm-cov --workspace --all-features --summary-only --json --output-path coverage.json PCT=$(python3 -c "import json; print(json.load(open('coverage.json'))['data'][0]['totals']['lines']['percent'])")