name: Code quality

on:
  push:
  pull_request:
  schedule:
  # Run every Friday at 18:02 UTC
  # https://crontab.guru/#2_18_*_*_5
  - cron: 2 18 * * 5

jobs:
  linters:
    runs-on: ${{ matrix.os }}
    strategy:
      # max-parallel: 5
      matrix:
        python-version:
        - 3.7
        os:
        - ubuntu-18.04
        env:
        - TOXENV: pre-commit
        - TOXENV: setup-check
        # - TOXENV: pre-commit-failing
    steps:
    - uses: actions/checkout@master
    - name: Set up Python ${{ matrix.python-version }}
      uses: actions/setup-python@v1
      with:
        version: ${{ matrix.python-version }}
    - name: Install tox
      run: |
        python -m pip install --upgrade tox
    - name: 'Initialize tox envs: ${{ matrix.env.TOXENV }}'
      run: |
        python -m tox --parallel auto --notest
      env: ${{ matrix.env }}
    - name: Test with tox
      run: |
        python -m tox --parallel 0
      env: ${{ matrix.env }}

name: Code quality

on:
  push:
  pull_request:
  schedule:
  # Run every Friday at 18:02 UTC
  # https://crontab.guru/#2_18_*_*_5
  - cron: 2 18 * * 5

jobs:
  linters:
    runs-on: ${{ matrix.os }}
    strategy:
      # max-parallel: 5
      matrix:
        python-version:
        - 3.7
        os:
        - ubuntu-18.04
        env:
        - TOXENV: pre-commit
        - TOXENV: setup-check
        # - TOXENV: pre-commit-failing
    steps:
    - uses: actions/checkout@master
    - name: Set up Python ${{ matrix.python-version }}
      uses: actions/setup-python@v1
      with:
        version: ${{ matrix.python-version }}
    - name: Install tox
      run: |
        python -m pip install --upgrade tox
    - name: 'Initialize tox envs: ${{ matrix.env.TOXENV }}'
      run: |
        python -m tox --parallel auto --notest
      env: ${{ matrix.env }}
    - name: Initialize pre-commit envs if needed
      run: |
        test -d .tox/pre-commit-ci && .tox/pre-commit-ci/bin/python -m pre_commit install-hooks || :
        test -d .tox/pre-commit-failing && .tox/pre-commit-failing/bin/python -m pre_commit install-hooks || :
    - name: Test with tox
      run: |
        python -m tox --parallel 0
      env: ${{ matrix.env }}

Add pre-commit init to Actions workflow
Add pre-commit init to Actions workflow
