diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b2fb393e..302cc2b7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,6 +11,7 @@ jobs: fail-fast: false matrix: python-version: [ '3.9', '3.10', '3.11', '3.12', '3.13' ] + podman-version: ['4.3.1', '5.4.2'] runs-on: ubuntu-latest container: @@ -20,10 +21,67 @@ jobs: options: --privileged --cgroupns=host steps: - uses: actions/checkout@v5 - - name: Install dependencies + - name: Install podman-4.3.1 + if: matrix.podman-version == '4.3.1' run: | set -e apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y podman + - name: Install dependencies for dpkg + if: matrix.podman-version == '5.4.2' + shell: bash + run: | + DEBIAN_FRONTEND=noninteractive apt update -y + DEBIAN_FRONTEND=noninteractive apt-get install -y conmon crun golang-github-containers-common libgpgme11 libsubid4 containernetworking-plugins + DEBIAN_FRONTEND=noninteractive apt update -y && apt upgrade -y buildah crun + - name: Download necessary podman-5.4.2 .deb files from podman-compose-test-data repository + if: matrix.podman-version == '5.4.2' + shell: bash + run: | + BASE_URL="https://raw.githubusercontent.com/mokibit/podman-compose-test-data/main/deb_files/podman-5.4.2" + FILES=( + "podman_5.4.2+composetest-1_amd64.deb" + "podman-docker_5.4.2+composetest-1_amd64.deb" + "podman-remote_5.4.2+composetest-1_amd64.deb" + ) + for FILE in "${FILES[@]}"; do + URL="${BASE_URL}/${FILE}" + echo "Downloading: $FILE" + curl -L -f -O "$URL" || { echo "Failed to download $FILE"; exit 1; } + done + - name: Install podman-5.4.2 from .deb packages + if: matrix.podman-version == '5.4.2' + run: | + dpkg -i *.deb + apt-get install -f -y + - name: Verify podman installation + run: | + podman --version + podman-docker version || echo "podman-docker not available" + - name: Download necessary crun-1.21 .deb files from podman-compose-test-data repository # podman-5.4.2 requires crun-1.21 + if: matrix.podman-version == '5.4.2' + shell: bash + run: | + BASE_URL="https://raw.githubusercontent.com/mokibit/podman-compose-test-data/main/deb_files/crun-1.21" + FILES=( + "crun-dbgsym_1.21-1_amd64.deb" + "crun_1.21-1_amd64.deb" + ) + for FILE in "${FILES[@]}"; do + URL="${BASE_URL}/${FILE}" + echo "Downloading: $FILE" + curl -L -f -O "$URL" || { echo "Failed to download $FILE"; exit 1; } + done + - name: Install crun-1.21 from .deb packages + if: matrix.podman-version == '5.4.2' + run: | + dpkg -i ./crun_1.21-1_amd64.deb + apt-get install -f -y + - name: Verify crun-1.21 installation + run: | + dpkg -l | awk '$2=="crun" {print $3}' + - name: Install other test dependencies + run: | + set -e python -m pip install --upgrade pip pip install -r requirements.txt pip install -r test-requirements.txt