From 413276f411f78358ba8115e7e020b3dce5e8b4bd Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Fri, 30 Apr 2021 18:06:58 -0700 Subject: [PATCH] Use pyright-action to run pyright, bump pyright (#5274) I recently published https://github.com/marketplace/actions/run-pyright, which wraps pyright and uses GHA magic to leave diagnostics on commits / PRs (like https://github.com/jakebailey/pyright-action-test/pull/1/files), plus a faster startup time thanks to GHA tool caching and piggy backing off of the `node` install used in GHA itself (so no `setup-node` needed). This PR switches to that action and leaves a comment noting that the version number is pinned in two places. This action is a prototype, but I'm pretty confident in it so far. --- .github/workflows/tests.yml | 8 ++++---- tests/pyright_test.py | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 7eca51ac7..742f0b5f0 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -99,11 +99,11 @@ jobs: fail-fast: false steps: - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 - - uses: actions/setup-node@v2 + - uses: jakebailey/pyright-action@v1 with: - node-version: '14' - - run: ./tests/pyright_test.py --pythonplatform ${{ matrix.python-platform }} --pythonversion ${{ matrix.python-version }} + version: 1.1.136 # Must match pyright_test.py. + python-platform: ${{ matrix.python-platform }} + python-version: ${{ matrix.python-version }} stubtest: name: Check stdlib with stubtest diff --git a/tests/pyright_test.py b/tests/pyright_test.py index 1ce0e0f7a..b648159a3 100755 --- a/tests/pyright_test.py +++ b/tests/pyright_test.py @@ -5,7 +5,7 @@ import subprocess import sys from pathlib import Path -_PYRIGHT_VERSION = "1.1.126" +_PYRIGHT_VERSION = "1.1.136" # Must match tests.yml. _WELL_KNOWN_FILE = Path("tests", "pyright_test.py")