From b8a5cc60b8ebedb54c96da4a79cc5fc600367fe5 Mon Sep 17 00:00:00 2001 From: Pavol Rusnak Date: Thu, 2 Feb 2023 12:55:37 +0000 Subject: [PATCH] add pyright workflow, unify mypy+flake8+pylint workflows MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: dni ⚡ --- .github/workflows/flake8.yml | 12 ++++++------ .github/workflows/mypy.yml | 4 ++-- .github/workflows/pylint.yml | 12 ++++++------ .github/workflows/pyright.yml | 28 ++++++++++++++++++++++++++++ 4 files changed, 42 insertions(+), 14 deletions(-) create mode 100644 .github/workflows/pyright.yml diff --git a/.github/workflows/flake8.yml b/.github/workflows/flake8.yml index 980b9c7b9..51bf1ae9c 100644 --- a/.github/workflows/flake8.yml +++ b/.github/workflows/flake8.yml @@ -10,18 +10,18 @@ jobs: python-version: ["3.9"] poetry-version: ["1.3.1"] steps: - - uses: actions/checkout@v2 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python-version }} + - uses: actions/checkout@v3 - name: Set up Poetry ${{ matrix.poetry-version }} uses: abatilo/actions-poetry@v2 with: poetry-version: ${{ matrix.poetry-version }} + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + cache: "poetry" - name: Install dependencies run: | - poetry config virtualenvs.create false poetry install - name: Run tests run: make flake8 diff --git a/.github/workflows/mypy.yml b/.github/workflows/mypy.yml index ad5be69d6..1e168deca 100644 --- a/.github/workflows/mypy.yml +++ b/.github/workflows/mypy.yml @@ -19,9 +19,9 @@ jobs: uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - cache: 'poetry' + cache: "poetry" - name: Install dependencies run: | poetry install - name: Run tests - run: poetry run mypy + run: make mypy diff --git a/.github/workflows/pylint.yml b/.github/workflows/pylint.yml index 8a43025b7..5c8eb29a0 100644 --- a/.github/workflows/pylint.yml +++ b/.github/workflows/pylint.yml @@ -10,18 +10,18 @@ jobs: python-version: ["3.9"] poetry-version: ["1.3.1"] steps: - - uses: actions/checkout@v2 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python-version }} + - uses: actions/checkout@v3 - name: Set up Poetry ${{ matrix.poetry-version }} uses: abatilo/actions-poetry@v2 with: poetry-version: ${{ matrix.poetry-version }} + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + cache: "poetry" - name: Install dependencies run: | - poetry config virtualenvs.create false poetry install - name: Run tests run: make pylint diff --git a/.github/workflows/pyright.yml b/.github/workflows/pyright.yml new file mode 100644 index 000000000..8639cc769 --- /dev/null +++ b/.github/workflows/pyright.yml @@ -0,0 +1,28 @@ +name: pyright + +on: [push, pull_request] + +jobs: + check: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.9"] + poetry-version: ["1.3.1"] + steps: + - uses: actions/checkout@v3 + - name: Set up Poetry ${{ matrix.poetry-version }} + uses: abatilo/actions-poetry@v2 + with: + poetry-version: ${{ matrix.poetry-version }} + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + cache: "poetry" + - name: Install dependencies + run: | + poetry install + npm install + - name: Run tests + run: make pyright