trigger docs #267
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: Static type check | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
pyright: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [3.9] | |
poetry-version: [1.3.2] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Cache poetry installation | |
uses: actions/cache@v2 | |
with: | |
path: ~/.local | |
key: poetry-${{ matrix.poetry-version }} | |
- name: Install Poetry | |
uses: snok/install-poetry@v1 | |
with: | |
poetry-version: ${{ matrix.poetry-version }} | |
virtualenvs-create: true | |
virtualenvs-in-project: true | |
- name: Cache dependencies | |
uses: actions/cache@v2 | |
with: | |
path: .venv | |
key: pydeps-${{ hashFiles('**/poetry.lock') }} | |
- name: Install dependencies | |
run: poetry install --with test --no-interaction --no-root | |
if: steps.cache-deps.outputs.cache-hit != 'true' | |
- name: Install AutoPR | |
run: poetry install --no-interaction | |
- name: Install pyright | |
run: npm install -g pyright | |
- name: Run pyright | |
run: poetry run pyright |