name: Code quality checks

on:
  push:
    branches:
      - main
  pull_request:

jobs:
  code_quality:
    name: Check code quality

    runs-on: ubuntu-latest

    strategy:
      fail-fast: false
      matrix:
        os: [ubuntu-latest, macos-latest, windows-latest]
        python-version: [3.6, 3.7, 3.8, 3.9]

    steps:
      - name: Checkout repository
        uses: actions/checkout@v2

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

      - name: Install dependencies
        run: |
          python -m pip install --upgrade pip
          pip install poetry
          poetry config virtualenvs.create false
          poetry install --no-root --no-interaction

      - name: Check code formatting
        run: make formatcheck

      - name: Check for linter errors
        run: make lint

      # - name: Check docstring formatting
      #   run: make doccheck # TODO

      - name: Check doc site build
        run: make docs

      - name: Check type annotations
        run: make typecheck

      - name: Run tests
        run: make test

      # - name: Check code coverage
      #   run: make covcheck # TODO

name: Code quality checks

on:
  push:
    branches:
      - main
  pull_request:

jobs:
  code_quality:
    name: Check code quality

    runs-on: ubuntu-latest

    strategy:
      fail-fast: false
      matrix:
        os: [ubuntu-latest, macos-latest, windows-latest]
        python-version: [3.6, 3.7, 3.8, 3.9]

    steps:
      - name: Checkout repository
        uses: actions/checkout@v2

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

      - name: Install dependencies
        run: |
          python -m pip install --upgrade pip
          pip install poetry
          poetry config virtualenvs.create false
          poetry install --no-root --no-interaction

      - name: Check code formatting
        run: make formatcheck

      - name: Check for linter errors
        run: make lint

      # - name: Check docstring formatting
      #   run: make doccheck # TODO

      - name: Check doc site build
        run: make docs

      - name: Check type annotations
        run: make typecheck

      - name: Run tests
        run: make test

      - name: Check code coverage
        run: make covcheck

Enable coverage check in CI
Enable coverage check in CI
