Add podman support #55
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Run tests | |
| on: [push, pull_request] | |
| jobs: | |
| docker-tests: | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest] | |
| python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] | |
| runs-on: ${{ matrix.os }} | |
| name: Docker / ${{ matrix.os }} / Python ${{ matrix.python-version }} | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Set up Python | |
| uses: actions/setup-python@v3 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install hatch | |
| - name: Install Docker CE (Ubuntu) | |
| if: matrix.os == 'ubuntu-latest' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| ca-certificates \ | |
| curl \ | |
| gnupg \ | |
| lsb-release | |
| sudo mkdir -p /etc/apt/keyrings | |
| curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg | |
| echo \ | |
| "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \ | |
| $(lsb_release -cs) stable" | \ | |
| sudo tee /etc/apt/sources.list.d/docker.list > /dev/null | |
| sudo apt-get update | |
| sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin | |
| sudo systemctl start docker | |
| docker --version | |
| - name: Install Docker (macOS) | |
| if: matrix.os == 'macos-latest' | |
| run: | | |
| brew install --cask docker | |
| open --background -a Docker | |
| echo "Waiting for Docker to start..." | |
| while ! docker system info > /dev/null 2>&1; do sleep 2; done | |
| docker --version | |
| - name: Run tests (Docker) | |
| run: | | |
| hatch run ci | |
| podman-tests: | |
| needs: docker-tests | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest] | |
| python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] | |
| runs-on: ${{ matrix.os }} | |
| name: Podman / ${{ matrix.os }} / Python ${{ matrix.python-version }} | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Set up Python | |
| uses: actions/setup-python@v3 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install hatch | |
| - name: Install Podman (Ubuntu) | |
| if: matrix.os == 'ubuntu-latest' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y podman | |
| echo "Waiting for Podman socket..." | |
| until podman info > /dev/null 2>&1; do sleep 2; done | |
| podman --version | |
| - name: Install Podman (macOS) | |
| if: matrix.os == 'macos-latest' | |
| run: | | |
| brew install podman | |
| podman machine init || true | |
| podman machine start | |
| echo "Waiting for Podman to start..." | |
| until podman info > /dev/null 2>&1; do sleep 2; done | |
| podman --version | |
| - name: Run tests (Podman) | |
| run: | | |
| export DBTESTTOOLS_USE_PODMAN=1 | |
| hatch run ci |