Add ci (#69) #19
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: Check Python Compatibility | |
| on: | |
| pull_request: | |
| branches: [ main ] | |
| push: | |
| branches: [ main ] | |
| jobs: | |
| test-python-compatibility: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.10", "3.11", "3.12", "3.13"] | |
| toolchain: [uv, pip] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install UV | |
| if: matrix.toolchain == 'uv' | |
| uses: astral-sh/setup-uv@v2 | |
| with: | |
| version: "latest" | |
| - name: Build package with ${{ matrix.toolchain }} | |
| if: matrix.toolchain == 'uv' | |
| run: | | |
| uv build | |
| ls -lh dist/ | |
| - name: Build package with ${{ matrix.toolchain }} | |
| if: matrix.toolchain == 'pip' | |
| run: | | |
| python -m pip install --upgrade pip build | |
| python -m build | |
| ls -lh dist/ | |
| - name: Install package with ${{ matrix.toolchain }} | |
| if: matrix.toolchain == 'uv' | |
| run: | | |
| uv pip install --system dist/*.whl | |
| uv run python -c "import petdeface; print('Package installed successfully')" | |
| - name: Test CLI | |
| if: matrix.toolchain == 'uv' | |
| run: | | |
| uv run petdeface --help | |
| - name: Install package with ${{ matrix.toolchain }} | |
| if: matrix.toolchain == 'pip' | |
| run: | | |
| python -m pip install dist/*.whl | |
| python -c "import petdeface; print('Package installed successfully')" | |
| - name: Test CLI | |
| if: matrix.toolchain == 'pip' | |
| run: | | |
| petdeface --help |