From 246fd3f6621046d7166ff14e70e2b42ad73d20f0 Mon Sep 17 00:00:00 2001 From: David Brownman Date: Mon, 13 Jan 2025 00:48:18 -0800 Subject: [PATCH] actually run tests with correct versions --- .github/workflows/ci.yml | 10 ++++++++-- justfile | 9 +++++++-- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 96fc8e919..337e0ea97 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -94,15 +94,21 @@ jobs: uses: actions/setup-python@v4 with: python-version: | - ${{ matrix.python.version }} + # the last in the list is the default; 3.10 is just for running pyright 3.10 + ${{ matrix.python.version }} + + - name: "check versions" + run: | + which python + echo $PATH - uses: stripe/openapi/actions/stripe-mock@master - name: "Install deps" run: just install - name: Typecheck with pyright - run: just pyright ${{ matrix.python.version }} + run: just ci-pyright ${{ matrix.python.version }} # Skip typecheking in pypy legs if: ${{ !contains(matrix.python.version, 'pypy') }} diff --git a/justfile b/justfile index 1b8d1106a..c3cf14102 100644 --- a/justfile +++ b/justfile @@ -23,8 +23,13 @@ mypy: lint: python -m flake8 --show-source stripe tests setup.py -pyright py_version: - pyright --pythonversion {{ py_version }} +pyright: + pyright + +# use a specific version for this +ci-pyright py_version: + python{{py_version}} --version + python{{py_version}} -m pyright --pythonversion {{ py_version }} format: ruff format . --quiet