-
Notifications
You must be signed in to change notification settings - Fork 108
Expand file tree
/
Copy pathpython_version_compatibility.yml
More file actions
43 lines (38 loc) · 1.17 KB
/
python_version_compatibility.yml
File metadata and controls
43 lines (38 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: Python Compatibility (Info Only)
on:
push:
branches:
- main
pull_request:
jobs:
info-check:
runs-on: ubuntu-latest
continue-on-error: true
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
# Optional: Cache uv for faster runs
- name: Cache uv
uses: actions/cache@v4
with:
path: ~/.cargo/bin/uv
key: uv-${{ runner.os }}
- name: Install uv
run: |
if [ ! -f ~/.cargo/bin/uv ]; then
curl -LsSf https://astral.sh/uv/install.sh | sh
fi
- name: Check Python ${{ matrix.python-version }}
continue-on-error: true
run: |
export PATH="$HOME/.cargo/bin:$PATH"
uv python install ${{ matrix.python-version }}
if uv sync --frozen --python ${{ matrix.python-version }}; then
uv run -p ${{ matrix.python-version }} python -c "import sys; print('✅ Compatible:', sys.version)"
echo "✅ Python ${{ matrix.python-version }} works"
else
echo "❌ Python ${{ matrix.python-version }} incompatible"
exit 1
fi