improve documentation for cli options and mention failOnWarnings
in the footnote for --warnings
#1615
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 'Validation' | |
env: | |
PYTHON_VERSION: 3.13 | |
on: | |
pull_request: | |
branches: [main] | |
jobs: | |
static_checks: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- run: ./pw uv venv --python ${{ env.PYTHON_VERSION }} | |
# need to use pw script at least once even when activating the context so that the wrapper installs pyprojectx | |
- run: ./pw uv sync --locked | |
- name: activate pyprojectx context | |
run: realpath ./.pyprojectx/main >> $GITHUB_PATH | |
- name: typescript typecheck | |
run: uv run npm run typecheck | |
- run: uv run npm run check | |
- name: python typecheck | |
run: uv run npm run typecheck-python | |
- name: ruff check | |
run: uv run ruff check --output-format github | |
- name: ruff format | |
run: uv run ruff format --check --diff | |
- name: pylint | |
run: uv run npm run pylint | |
tests: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [macos-latest, windows-latest, ubuntu-latest] | |
name: Test ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Python ${{env.PYTHON_VERSION}} | |
uses: actions/setup-python@v5 | |
id: install_python | |
with: | |
python-version: ${{env.PYTHON_VERSION}} | |
- run: ./pw uv sync | |
# ideally we would do the same thing with ./node_modules/.bin to ensure that the version of node from nodejs-wheel | |
# is always used, but it seems to be impossible to prevent github actions from using its own node version | |
- name: add pyprojectx to PATH (linux) | |
if: runner.os != 'Windows' | |
run: | | |
realpath ./.pyprojectx/main >> $GITHUB_PATH | |
- name: add pyprojectx to PATH (windows) | |
if: runner.os == 'Windows' | |
run: | | |
echo (resolve-path "./.pyprojectx/main").path | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append | |
- name: python tests | |
run: uv run npm run test-python -- -m "not needs_all_docstubs" | |
- name: npm test (pyright-internal) | |
run: uv run npm test | |
working-directory: packages/pyright-internal | |
# TODO: all tests run in a venv now so i dont think any of this stuff is needed anymore | |
- name: Create Venv | |
run: | | |
${{ steps.install_python.outputs.python-path }} -m venv .venv | |
- name: Activate and install pytest (linux) | |
if: runner.os != 'Windows' | |
run: | | |
source .venv/bin/activate | |
python -m pip install pytest | |
python -c "import sys;print('python_venv_path=' + sys.executable)" >> $GITHUB_ENV | |
- name: Activate and install pytest (windows) | |
if: runner.os == 'Windows' | |
run: | | |
.venv\scripts\activate | |
python -m pip install pytest | |
python -c "import sys;print('python_venv_path=' + sys.executable)" | Out-File -FilePath $env:GITHUB_ENV -Append | |
- name: Echo python_venv_path | |
run: | | |
echo python_venv_path=${{env.python_venv_path}} | |
- name: Run import tests with venv | |
env: | |
CI_IMPORT_TEST_VENVPATH: '../../' | |
CI_IMPORT_TEST_VENV: '.venv' | |
run: uv run npm run test:imports | |
working-directory: packages/pyright-internal | |
- name: Run import tests with pythonpath | |
env: | |
CI_IMPORT_TEST_PYTHONPATH: ${{env.python_venv_path}} | |
run: uv run npm run test:imports | |
working-directory: packages/pyright-internal | |
required: | |
runs-on: ubuntu-latest | |
name: Required | |
needs: | |
- static_checks | |
- tests | |
steps: | |
- run: echo All required jobs succeeded. |