name: Check type annotations by mypy

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - name: Set up Python 3.10
      uses: actions/setup-python@v2
      with:
        python-version: '3.10'
    - name: Install dependencies
      run: |
        python -m pip install --upgrade pip
        python -m pip install mypy pyparsing geomdl
    - name: Install without C-extensions
      run: |
        python setup.py install
    - name: Check type annotations by mypy
      run: |
        python -m mypy --ignore-missing-imports -p ezdxf
