From 9499053d79a20b89b75ca63129a23422db68b99a Mon Sep 17 00:00:00 2001 From: Juan P Lopez Date: Wed, 18 Dec 2024 20:11:09 -0500 Subject: [PATCH] fix: add podman compose --- .github/workflows/e2e-ios-podman.yml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/e2e-ios-podman.yml b/.github/workflows/e2e-ios-podman.yml index 97ceaa9e63..8e0dad50bb 100644 --- a/.github/workflows/e2e-ios-podman.yml +++ b/.github/workflows/e2e-ios-podman.yml @@ -22,15 +22,14 @@ jobs: - name: Set up Podman and pull images in background run: | - brew install podman + brew install podman podman-compose podman machine init podman machine start podman version # Set DOCKER_HOST environment variable - PODMAN_UID=$(id -u) - echo "PODMAN_UID=${PODMAN_UID}" >> $GITHUB_ENV - echo "DOCKER_HOST=unix:///run/user/${PODMAN_UID}/podman/podman.sock" >> $GITHUB_ENV + SOCKET_PATH=$(podman machine inspect --format '{{.ConnectionInfo.PodmanSocket.Path}}') + echo "DOCKER_HOST=unix://${SOCKET_PATH}" >> $GITHUB_ENV # Wait for Podman to be ready while ! podman info > /dev/null 2>&1; do @@ -41,11 +40,11 @@ jobs: podman info # Start pulling images - podman compose -f dev/vendor/galoy-quickstart/docker-compose.yml pull --include-deps --quiet & + podman-compose -f dev/vendor/galoy-quickstart/docker-compose.yml pull & - name: Initialize ci deps env: - DOCKER_HOST: "unix:///run/user/${{ env.PODMAN_UID }}/podman/podman.sock" + DOCKER_HOST: ${{ env.DOCKER_HOST }} run: nix develop -c tilt -f ./dev/Tiltfile ci --timeout 0 - name: Restore Node Modules Cache @@ -131,7 +130,7 @@ jobs: - name: Run E2E Tests id: run-tests env: - DOCKER_HOST: "unix:///run/user/${{ env.PODMAN_UID }}/podman/podman.sock" + DOCKER_HOST: ${{ env.DOCKER_HOST }} run: | # Wait for device to be ready while ! xcrun simctl list devices | grep "(Booted)"; do @@ -150,6 +149,8 @@ jobs: - name: Cleanup Processes if: always() + env: + DOCKER_HOST: ${{ env.DOCKER_HOST }} run: | # Function to kill process by PID file kill_process() { @@ -170,7 +171,7 @@ jobs: done # Additional cleanup commands - DOCKER_HOST="unix:///run/user/${{ env.PODMAN_UID }}/podman/podman.sock" nix develop -c tilt down -f ./dev/Tiltfile + nix develop -c tilt down -f ./dev/Tiltfile pkill -f "node.*metro" || true pkill -f "tilt" || true podman machine stop || true