# -----------------------------------------------------------------------------
#   - invoked on push, pull_request, or manual trigger
#   - test under 3 versions of python
# -----------------------------------------------------------------------------
name: build
on: [push, pull_request, workflow_dispatch]

jobs:
  build:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        python-version: [3.6, 3.7, 3.8]
    steps:
      - uses: actions/checkout@v2
      - name: Set up Python ${{ matrix.python-version }}
        uses: actions/setup-python@v2
        with:
          python-version: ${{ matrix.python-version }}
      - name: Print environment values
        run: |
          cat $GITHUB_ENV
      - name: Update pip
        run: |
          python -m pip install --upgrade pip
      - name: Install dependencies
        run: |
          pip install .[dev]
      - name: Test
        run: |
          pytest ./tests
      - name: Doc build
        run: |
          make html -C docs/ SPHINXOPTS="-W --keep-going -n"
      - name: Doctest
        run: |
          make doctest -C docs/
      - name: Lint
        run: |
          pip install black==22.1.0 isort
          black . --check -v
          isort . --check -v

# -----------------------------------------------------------------------------
#   - invoked on push, pull_request, or manual trigger
#   - test under 3 versions of python
# -----------------------------------------------------------------------------
name: build
on: [push, pull_request, workflow_dispatch]

jobs:
  build:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        python-version: [3.6, 3.7, 3.8]
    steps:
      - uses: actions/checkout@v2
      - name: Set up Python ${{ matrix.python-version }}
        uses: actions/setup-python@v2
        with:
          python-version: ${{ matrix.python-version }}
      - name: Print environment values
        run: |
          cat $GITHUB_ENV
      - name: Update pip
        run: |
          python -m pip install --upgrade pip
      - name: Install dependencies
        run: |
          pip install .[dev]
      - name: Test
        run: |
          pytest ./tests
      - name: Doc build
        run: |
          make html -C docs/ SPHINXOPTS="-W --keep-going -n"
      - name: Doctest
        run: |
          make doctest -C docs/
      - name: Lint
        run: |
          pip install black==22.1.0 isort
          black . --check --diff
          isort . --check --verbose --only-modified --diff

Update output options for black and isort
Update output options for black and isort
