name: CI

on:
  pull_request:
  push:
    branches: master

jobs:
  test:
    name: test w/ Python ${{ matrix.python-version }}

    runs-on: ubuntu-latest

    strategy:
      matrix:
        python-version: ["3.6", "3.7", "3.8"]

    steps:
      - uses: actions/checkout@v1
      - uses: actions/cache@v1
        with:
          path: ~/.cache/pip
          key: ${{ runner.os }}-pip-${{ hashFiles('pyproject.toml') }}
          restore-keys: |
            ${{ runner.os }}-pip-
      - uses: actions/setup-python@v1
        with:
          python-version: ${{ matrix.python-version }}
      - run: pip install nox
      - run: nox --session tests-${{ matrix.python-version }}
        env:
          PYTHONDEVMODE: 1
      - uses: codecov/codecov-action@v1
        if: always()
        with:
          token: ${{ secrets.CODECOV_TOKEN }}
          file: ./cov.xml

  lint:
    if: github.event.action != 'closed' || github.event.pull_request.merged
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v2
      - uses: actions/cache@v1
        with:
          path: ~/.cache/pip
          key: ${{ runner.os }}-pip-${{ hashFiles('pyproject.toml') }}
          restore-keys: |
            ${{ runner.os }}-pip-
      - uses: actions/setup-python@v2
        with:
          python-version: "3.8"
      - run: pip install nox
      - run: nox --session lint

name: CI

on:
  pull_request:
  push:
    branches: master

jobs:
  test:
    name: test w/ Python ${{ matrix.python-version }}

    runs-on: ubuntu-latest

    strategy:
      matrix:
        python-version: ["3.6", "3.7", "3.8"]

    steps:
      - uses: actions/checkout@v1
      - uses: actions/cache@v1
        with:
          path: ~/.cache/pip
          key: ${{ runner.os }}-pip-${{ hashFiles('pyproject.toml') }}
          restore-keys: |
            ${{ runner.os }}-pip-
      - uses: actions/setup-python@v1
        with:
          python-version: ${{ matrix.python-version }}
      - run: pip install nox
      - run: nox --session tests-${{ matrix.python-version }}
        env:
          PYTHONDEVMODE: 1
      - uses: codecov/codecov-action@v1
        if: always()
        with:
          token: ${{ secrets.CODECOV_TOKEN }}
          file: ./cov.xml

  lint:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v2
      - uses: actions/cache@v1
        with:
          path: ~/.cache/pip
          key: ${{ runner.os }}-pip-${{ hashFiles('pyproject.toml') }}
          restore-keys: |
            ${{ runner.os }}-pip-
      - uses: actions/setup-python@v2
        with:
          python-version: "3.8"
      - run: pip install nox
      - run: nox --session lint

Delete a wayward 'if' guard
Delete a wayward 'if' guard