1+ name : Check Python Compatibility
2+
3+ on :
4+ pull_request :
5+ branches : [ main ]
6+ push :
7+ branches : [ main ]
8+
9+ jobs :
10+ test-python-compatibility :
11+ runs-on : ubuntu-latest
12+ strategy :
13+ matrix :
14+ python-version : ["3.10", "3.11", "3.12", "3.13"]
15+ toolchain : [uv, pip]
16+
17+ steps :
18+ - name : Checkout code
19+ uses : actions/checkout@v4
20+
21+ - name : Set up Python ${{ matrix.python-version }}
22+ uses : actions/setup-python@v4
23+ with :
24+ python-version : ${{ matrix.python-version }}
25+
26+ - name : Install UV
27+ if : matrix.toolchain == 'uv'
28+ uses : astral-sh/setup-uv@v2
29+ with :
30+ version : " latest"
31+
32+ - name : Build package with ${{ matrix.toolchain }}
33+ if : matrix.toolchain == 'uv'
34+ run : |
35+ uv build
36+ ls -lh dist/
37+
38+ - name : Build package with ${{ matrix.toolchain }}
39+ if : matrix.toolchain == 'pip'
40+ run : |
41+ python -m pip install --upgrade pip build
42+ python -m build
43+ ls -lh dist/
44+
45+ - name : Install package with ${{ matrix.toolchain }}
46+ if : matrix.toolchain == 'uv'
47+ run : |
48+ uv pip install --system dist/*.whl
49+ uv run python -c "import petdeface; print('Package installed successfully')"
50+
51+ - name : Test CLI
52+ if : matrix.toolchain == 'uv'
53+ run : |
54+ uv run petdeface --help
55+
56+ - name : Install package with ${{ matrix.toolchain }}
57+ if : matrix.toolchain == 'pip'
58+ run : |
59+ python -m pip install dist/*.whl
60+ python -c "import petdeface; print('Package installed successfully')"
61+
62+ - name : Test CLI
63+ if : matrix.toolchain == 'pip'
64+ run : |
65+ petdeface --help
0 commit comments