name: type-hints

on:
  push:
    branches:
      - master
      - 2.3.X

jobs:

  check-typing:
    runs-on: ubuntu-latest
    timeout-minutes: 30
    strategy:
      fail-fast: false
      matrix:
        python-version: [ '3.6', '3.7', '3.8', '3.9', '3.10', '3.11' ]

    steps:
    - uses: actions/checkout@v2

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

    - name: Install typing dependencies
      run: |
        python -m pip install -U pip
        python -m pip install mypy==0.971
        python -m pip install -U types-requests types-pkg_resources types-setuptools
    - name: Run typing check with mypy
      run: |
        mypy
