Fix-podman-regression #110
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: "PR Build and Test" | |
| on: | |
| pull_request: | |
| paths-ignore: | |
| - .gitignore | |
| - .github/renovate.json | |
| - .pre-commit-config.yaml | |
| - LICENSE | |
| - README.MD | |
| - docs/ | |
| workflow_dispatch: | |
| env: | |
| REGISTRY: ghcr.io | |
| IMAGE_NAME: ${{ github.repository }} | |
| jobs: | |
| unit-tests: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6.8.0 | |
| - name: Run tests | |
| run: | | |
| uv sync --locked --directory src/ | |
| uv run --directory src/ pytest -m "unit" -v | |
| integration-tests: | |
| runs-on: ubuntu-latest | |
| needs: unit-tests | |
| steps: | |
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6.8.0 | |
| - name: Run integration tests | |
| run: | | |
| uv sync --locked --directory src/ | |
| uv run --directory src/ pytest -m "integration" -v | |
| integration-tests-podman: | |
| runs-on: ubuntu-latest | |
| needs: unit-tests | |
| steps: | |
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 | |
| - name: Install Podman | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get -y install podman podman-compose podman-docker | |
| - name: Configure Podman socket | |
| run: | | |
| systemctl --user enable --now podman.socket | |
| ln -s /usr/lib/systemd/user/podman.socket /var/run/docker.sock | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6.8.0 | |
| - name: Run integration tests with Podman | |
| run: | | |
| uv sync --locked --directory src/ | |
| export DOCKER_HOST=unix:///run/user/$UID/podman/podman.sock | |
| uv run --directory src/ pytest -m "integration" -v | |
| code-quality: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 | |
| - uses: astral-sh/ruff-action@57714a7c8a2e59f32539362ba31877a1957dded1 # v3.5.1 | |
| with: | |
| args: "format --check --diff" | |
| src: ./src | |
| version-file: ./src/pyproject.toml | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3.7.0 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1 | |
| - name: Test build Docker image | |
| uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0 | |
| with: | |
| context: src/ | |
| platforms: linux/amd64,linux/arm64 | |
| push: false | |
| tags: | | |
| ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }} |