Skip to content

[pyright updated to 1.1.361] Update Version #497

[pyright updated to 1.1.361] Update Version

[pyright updated to 1.1.361] Update Version #497

Workflow file for this run

name: Test
on:
push:
branches:
- main
paths-ignore:
- "*.md"
- ".vscode/**"
- "docs/**"
- "LICENSE"
pull_request:
branches:
- main
paths-ignore:
- "*.md"
- ".vscode/**"
- "docs/**"
- "LICENSE"
jobs:
test:
name: test
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
node: [14, 16]
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
steps:
- uses: actions/checkout@v3
# TODO: ensure that pyright-python uses this node version
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r dev-requirements.txt
- uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('dev-requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Ensure node version
run: |
python .github/scripts/check_node.py '${{ matrix.node }}'
- name: Run tests
run: |
tox -e setup,py,report
lint:
name: lint
runs-on: ubuntu-latest
strategy:
max-parallel: 2
matrix:
python-version: [3.9]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r dev-requirements.txt
- uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('dev-requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Check linters
run: |
tox -e lint
docker:
name: docker
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
docker-platform: [linux/amd64, linux/arm64]
python-os-distro: [slim-bullseye, alpine]
exclude:
# Dockerfile is currently broken for alpine / arm64
# https://github.com/RobertCraigie/pyright-python/issues/123
- docker-platform: linux/arm64
python-os-distro: alpine
# This is currently way too slow, takes ~30 minutes to complete
# TODO: investigate
- docker-platform: linux/arm64
python-os-distro: slim-bullseye
steps:
- uses: actions/checkout@v3
# https://github.com/docker/build-push-action/
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Docker Build
uses: docker/build-push-action@v3
# https://github.com/docker/build-push-action/#inputs
# Test each platform individually for easier testing
with:
context: .
file: tests/Dockerfile
platforms: "${{ matrix.docker-platform }}"
build-args: OS_DISTRO=${{ matrix.python-os-distro }}
cache-from: type=gha
cache-to: type=gha,mode=max
docker-windows:
name: docker (windows)
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Docker Build
# Use --% to allow double hyphen
# Caching not currently working since we don't use buildx yet, windows
# support seems poor because of interactions with --privileged
# --cache-from=type=gha --cache-to=type=gha,mode=max
run: |
docker build --% -f tests/windows.Dockerfile -t pyright-python .