This repository has been archived by the owner on Jun 12, 2024. It is now read-only.
build(deps-dev): Bump pyright from 1.1.305 to 1.1.356 #389
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: CI | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
types: [ opened, synchronize ] | |
jobs: | |
flake8: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [ '3.11' ] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Restore cache and venv | |
id: cache | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cache | |
.venv | |
key: ${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('poetry.lock') }} | |
- name: Install Poetry | |
if: steps.cache.outputs.cache-hit != 'true' | |
uses: snok/install-poetry@v1.3.4 | |
with: | |
virtualenvs-in-project: true | |
- name: Install dependencies | |
if: steps.cache.outputs.cache-hit != 'true' | |
run: poetry install --with dev | |
- name: Run flake8 | |
run: | | |
source .venv/bin/activate | |
pre-commit run --all-files flake8 | |
# mypy: | |
# runs-on: ubuntu-latest | |
# strategy: | |
# matrix: | |
# python-version: [ '3.11' ] | |
# steps: | |
# - name: Checkout | |
# uses: actions/checkout@v4 | |
# - name: Setup Python | |
# uses: actions/setup-python@v5 | |
# with: | |
# python-version: ${{ matrix.python-version }} | |
# - name: Restore cache and venv | |
# id: cache | |
# uses: actions/cache@v4 | |
# with: | |
# path: | | |
# ~/.cache | |
# .venv | |
# key: ${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('poetry.lock') }} | |
# - name: Restore mypy cache | |
# uses: actions/cache@v4 | |
# with: | |
# path: .mypy_cache | |
# key: ${{ matrix.python-version }} | |
# - name: Install Poetry | |
# if: steps.cache.outputs.cache-hit != 'true' | |
# uses: snok/install-poetry@v1.3.4 | |
# with: | |
# virtualenvs-in-project: true | |
# - name: Install dependencies | |
# if: steps.cache.outputs.cache-hit != 'true' | |
# run: poetry install --with dev | |
# - name: Run mypy | |
# run: | | |
# source .venv/bin/activate | |
# pre-commit run --all-files mypy | |
pyright: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [ '3.11' ] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Restore cache and venv | |
id: cache | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cache | |
.venv | |
key: ${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('poetry.lock') }} | |
- name: Install Poetry | |
if: steps.cache.outputs.cache-hit != 'true' | |
uses: snok/install-poetry@v1.3.4 | |
with: | |
virtualenvs-in-project: true | |
- name: Install dependencies | |
if: steps.cache.outputs.cache-hit != 'true' | |
run: poetry install --with dev | |
- name: Run pyright | |
run: | | |
source .venv/bin/activate | |
pre-commit run --all-files pyright | |
pyright-verify: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [ '3.11' ] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Restore cache and venv | |
id: cache | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cache | |
.venv | |
key: ${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('poetry.lock') }} | |
- name: Install Poetry | |
if: steps.cache.outputs.cache-hit != 'true' | |
uses: snok/install-poetry@v1.3.4 | |
with: | |
virtualenvs-in-project: true | |
- name: Install dependencies | |
if: steps.cache.outputs.cache-hit != 'true' | |
run: poetry install --with dev | |
- name: Run pyright-verify | |
run: | | |
source .venv/bin/activate | |
pre-commit run --all-files pyright-verify | |
pytest: | |
runs-on: ${{ matrix.os }} | |
defaults: | |
run: | |
shell: bash | |
strategy: | |
matrix: | |
os: [ ubuntu-latest, windows-latest, macos-latest ] | |
python-version: [ '3.11' ] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Restore cache and venv | |
id: cache | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cache | |
.venv | |
key: ${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('poetry.lock') }} | |
- name: Restore pytest cache | |
uses: actions/cache@v4 | |
with: | |
path: .pytest_cache | |
key: pytest-${{ runner.os }}-${{ matrix.python-version }} | |
- name: Install Poetry | |
if: steps.cache.outputs.cache-hit != 'true' | |
uses: snok/install-poetry@v1.3.4 | |
with: | |
virtualenvs-in-project: true | |
- name: Install dependencies | |
if: steps.cache.outputs.cache-hit != 'true' | |
run: poetry install --with dev | |
- name: Run pytest on Windows | |
if: runner.os == 'Windows' | |
run: | | |
source .venv/scripts/activate | |
pre-commit run --all-files pytest | |
- name: Run pytest on normal OS | |
if: runner.os != 'Windows' | |
run: | | |
source .venv/bin/activate | |
pre-commit run --all-files pytest |