From 7b0048fc38b5e033fd5d93e846bf40707299cf2e Mon Sep 17 00:00:00 2001 From: Dan Davison Date: Mon, 31 Mar 2025 13:39:43 -0400 Subject: [PATCH] Check intended version --- .github/workflows/ci.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2b079e60b..cb57f77ae 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -49,6 +49,19 @@ jobs: - uses: astral-sh/setup-uv@v5 - run: uv tool install poethepoet - run: uv sync --all-extras + - name: Check python version + shell: bash + run: | + actual=$(uv run python -c "import sys; print('.'.join(map(str, sys.version_info[:2])))") + if [[ "$actual" != "${{ matrix.python }}" ]]; then + echo "Python version in use by uv ($actual) does not match intended version (${{ matrix.python }})" + exit 1 + fi + actual=$(python -c "import sys; print('.'.join(map(str, sys.version_info[:2])))") + if [[ "$actual" != "${{ matrix.python }}" ]]; then + echo "Python version on PATH ($actual) does not match intended version (${{ matrix.python }})" + exit 1 + fi - run: poe bridge-lint if: ${{ matrix.clippyLinter }} - run: poe lint