name: lint

on:
  push:
  pull_request:
    types: [ opened, synchronize ]

jobs:
  check:
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix:
        python-version: [ '3.8', '3.x' ]

    name: check ${{ matrix.python-version }}
    steps:
      - uses: actions/checkout@v2
        with:
          fetch-depth: 0

      - name: Set up CPython ${{ matrix.python-version }}
        uses: actions/setup-python@v2
        with:
          python-version: ${{ matrix.python-version }}

      - name: Install dependencies
        id: install-deps
        run: |
          python -m pip install --upgrade pip setuptools wheel black
          pip install -U -r requirements.txt

      - name: Setup node.js
        uses: actions/setup-node@v2
        with:
          node-version: '16'

      - name: Install pyright
        run: |
          npm install -g pyright@1.1.235

      - name: Run pyright
        run: |
          pyright

      - name: Run black
        if: ${{ always() && steps.install-deps.outcome == 'success' }}
        run: |
          black --check --verbose discord examples

name: lint

on:
  push:
  pull_request:
    types: [ opened, synchronize ]

jobs:
  check:
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix:
        python-version: [ '3.8', '3.x' ]

    name: check ${{ matrix.python-version }}
    steps:
      - uses: actions/checkout@v2
        with:
          fetch-depth: 0

      - name: Set up CPython ${{ matrix.python-version }}
        uses: actions/setup-python@v2
        with:
          python-version: ${{ matrix.python-version }}

      - name: Install dependencies
        id: install-deps
        run: |
          python -m pip install --upgrade pip setuptools wheel black
          pip install -U -r requirements.txt

      - name: Setup node.js
        uses: actions/setup-node@v2
        with:
          node-version: '16'

      - name: Run Pyright
        uses: jakebailey/pyright-action@v1
        with:
          version: '1.1.235'
          warnings: false
          no-comments: ${{ matrix.python-version != '3.x' }}

      - name: Run black
        if: ${{ always() && steps.install-deps.outcome == 'success' }}
        run: |
          black --check discord examples

Use pyright CI action and remove --verbose from black
Use pyright CI action and remove --verbose from black
