<commit_before>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.8
        os:
        - ubuntu-latest
        toxenv:
        - pre-commit
        # - pre-commit-failing
        - setup-check
        - build-docs
        - spellcheck-docs
        - linkcheck-docs

    env:
      TOX_PARALLEL_NO_SPINNER: 1
      TOXENV: ${{ matrix.toxenv }}

    steps:
    - uses: actions/checkout@master
    - name: Set up Python ${{ matrix.python-version }}
      uses: actions/setup-python@v2
      with:
        python-version: ${{ matrix.python-version }}
    - name: Pre-commit cache
      uses: actions/cache@v2
      with:
        path: ~/.cache/pre-commit
        key: ${{ runner.os }}-pre-commit-${{ hashFiles('setup.cfg') }}-${{ hashFiles('setup.py') }}-${{ hashFiles('tox.ini') }}-${{ hashFiles('pyproject.toml') }}-${{ hashFiles('.pre-commit-config.yaml') }}-${{ hashFiles('.pre-commit-config.yaml.failing') }}-${{ hashFiles('pytest.ini') }}
        restore-keys: |
          ${{ runner.os }}-pre-commit-
          ${{ runner.os }}-
    - name: Pip cache
      uses: actions/cache@v2
      with:
        path: ~/.cache/pip
        key: ${{ runner.os }}-pip-${{ hashFiles('setup.cfg') }}-${{ hashFiles('setup.py') }}-${{ hashFiles('tox.ini') }}-${{ hashFiles('pyproject.toml') }}-${{ hashFiles('.pre-commit-config.yaml') }}-${{ hashFiles('.pre-commit-config.yaml.failing') }}-${{ hashFiles('pytest.ini') }}
        restore-keys: |
          ${{ runner.os }}-pip-
          ${{ runner.os }}-
    - name: Install tox
      run: |
        python -m pip install --upgrade tox
    - name: 'Initialize tox envs: ${{ matrix.env.TOXENV }}'
      run: >-
        python -m
        tox
        --parallel auto
        --parallel-live
        -vv
        --skip-missing-interpreters false
        --notest
    - name: Initialize pre-commit envs if needed
      run: |
        test -d .tox/pre-commit && .tox/pre-commit/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 auto
        --parallel-live
        -vv
<commit_msg>Add TOXENV-based names to the GHA linter jobs<commit_after>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:
    name: ${{ matrix.toxenv }}
    runs-on: ${{ matrix.os }}
    strategy:
      # max-parallel: 5
      matrix:
        python-version:
        - 3.8
        os:
        - ubuntu-latest
        toxenv:
        - pre-commit
        # - pre-commit-failing
        - setup-check
        - build-docs
        - spellcheck-docs
        - linkcheck-docs

    env:
      TOX_PARALLEL_NO_SPINNER: 1
      TOXENV: ${{ matrix.toxenv }}

    steps:
    - uses: actions/checkout@master
    - name: Set up Python ${{ matrix.python-version }}
      uses: actions/setup-python@v2
      with:
        python-version: ${{ matrix.python-version }}
    - name: Pre-commit cache
      uses: actions/cache@v2
      with:
        path: ~/.cache/pre-commit
        key: ${{ runner.os }}-pre-commit-${{ hashFiles('setup.cfg') }}-${{ hashFiles('setup.py') }}-${{ hashFiles('tox.ini') }}-${{ hashFiles('pyproject.toml') }}-${{ hashFiles('.pre-commit-config.yaml') }}-${{ hashFiles('.pre-commit-config.yaml.failing') }}-${{ hashFiles('pytest.ini') }}
        restore-keys: |
          ${{ runner.os }}-pre-commit-
          ${{ runner.os }}-
    - name: Pip cache
      uses: actions/cache@v2
      with:
        path: ~/.cache/pip
        key: ${{ runner.os }}-pip-${{ hashFiles('setup.cfg') }}-${{ hashFiles('setup.py') }}-${{ hashFiles('tox.ini') }}-${{ hashFiles('pyproject.toml') }}-${{ hashFiles('.pre-commit-config.yaml') }}-${{ hashFiles('.pre-commit-config.yaml.failing') }}-${{ hashFiles('pytest.ini') }}
        restore-keys: |
          ${{ runner.os }}-pip-
          ${{ runner.os }}-
    - name: Install tox
      run: |
        python -m pip install --upgrade tox
    - name: 'Initialize tox envs: ${{ matrix.env.TOXENV }}'
      run: >-
        python -m
        tox
        --parallel auto
        --parallel-live
        -vv
        --skip-missing-interpreters false
        --notest
    - name: Initialize pre-commit envs if needed
      run: |
        test -d .tox/pre-commit && .tox/pre-commit/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 auto
        --parallel-live
        -vv

{'fraction_non_alphanumeric': 0.1751263902932255, 'fraction_numerical': 0.007684529828109201, 'mean_word_length': 1.899179366940211, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1063615', 'n_tokens_mistral': 1726, 'n_tokens_neox': 1625, 'n_words': 325}