Skip to content

Commit f54e078

Browse files
committed
Install python on $PATH and check version
1 parent b8c425c commit f54e078

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

.github/workflows/ci.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,22 @@ jobs:
2727
- uses: actions/checkout@v4
2828
with:
2929
submodules: recursive
30+
- run: uv --preview python install --default ${{ matrix.python }}
3031
- run: uv tool install poethepoet
3132
- run: uv sync --group=dsl --group=encryption --group=trio-async --python ${{ matrix.python }}
33+
- name: Check python version
34+
shell: bash
35+
run: |
36+
actual=$(uv run python -c "import sys; print('.'.join(map(str, sys.version_info[:2])))")
37+
if [[ "$actual" != "${{ matrix.python }}" ]]; then
38+
echo "Python version in use by uv ($actual) does not match intended version (${{ matrix.python }})"
39+
exit 1
40+
fi
41+
actual=$(python -c "import sys; print('.'.join(map(str, sys.version_info[:2])))")
42+
if [[ "$actual" != "${{ matrix.python }}" ]]; then
43+
echo "Python version on $PATH ($actual) does not match intended version (${{ matrix.python }})"
44+
exit 1
45+
fi
3246
- run: poe lint
3347
- run: mkdir junit-xml
3448
- run: poe test -s --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml

0 commit comments

Comments
 (0)