<commit_before>name: Lint and Test

on: [push, pull_request]

env:
  PYTEST_DISCORD_WEBHOOK: ${{ secrets.PYTEST_DISCORD_WEBHOOK }}

jobs:
  lint:
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        python-version: [3.8]
        os: [ubuntu-latest]
    concurrency:
      group: ${{ github.workflow }}-${GITHUB_JOB}
      cancel-in-progress: true
    timeout-minutes: 20
    steps:
      - uses: actions/checkout@v2

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

      - name: Install pip
        run: python -m pip install --upgrade --disable-pip-version-check "pip>=21.1"

      - name: Get pip cache dir
        id: pip-cache
        run: echo "::set-output name=dir::$(pip cache dir)"

      - name: Cache pip
        uses: actions/cache@v2
        with:
          path: |
            ${{ steps.pip-cache.outputs.dir }}
            ./.tox
          key: ${{ matrix.os }}-${{ matrix.python-version }}-pip-${{ hashFiles('**/requirements.txt') }}
          restore-keys: ${{ matrix.os }}-${{ matrix.python-version }}-pip-

      - name: Install dependencies
        run: make setup-ci

      - name: Lint
        run: make check

  unit-test:
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        python-version: ['3.6', '3.7', '3.8', '3.9', '3.10', pypy3]
        os: [ubuntu-latest, macos-latest, windows-latest]
    concurrency:
      group: ${{ github.workflow }}-${{ matrix.os }}-${{ matrix.python-version }}
      cancel-in-progress: true
    timeout-minutes: 20
    steps:
      - uses: actions/checkout@v2

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

      - name: Install pip
        run: python -m pip install --upgrade --disable-pip-version-check "pip>=21.1"

      - name: Get pip cache dir
        id: pip-cache
        run: echo "::set-output name=dir::$(pip cache dir)"

      - name: Cache pip
        uses: actions/cache@v2
        with:
          path: |
            ${{ steps.pip-cache.outputs.dir }}
            ./.tox
          key: ${{ matrix.os }}-${{ matrix.python-version }}-pip-${{ hashFiles('**/requirements.txt') }}
          restore-keys: ${{ matrix.os }}-${{ matrix.python-version }}-pip-

      - name: Install dependencies
        run: make setup-ci

      - name: Run tests
        run: tox -e cov -- --discord-verbose=0

      - name: Upload coverage report
        run: |
          python -m pip install --upgrade --disable-pip-version-check coveralls
          coveralls --service=github
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.8'
<commit_msg>Remove strategy.matrix from a lint job<commit_after>name: Lint and Test

on: [push, pull_request]

env:
  PYTEST_DISCORD_WEBHOOK: ${{ secrets.PYTEST_DISCORD_WEBHOOK }}

jobs:
  lint:
    runs-on: ubuntu-latest
    env:
      python-version: "3.8"
    concurrency:
      group: ${{ github.workflow }}-${GITHUB_JOB}
      cancel-in-progress: true
    timeout-minutes: 20
    steps:
      - uses: actions/checkout@v2

      - name: Setup Python ${{ env.python-version }}
        uses: actions/setup-python@v2
        with:
          python-version: ${{ env.python-version }}

      - name: Install pip
        run: python -m pip install --upgrade --disable-pip-version-check "pip>=21.1"

      - name: Get pip cache dir
        id: pip-cache
        run: echo "::set-output name=dir::$(pip cache dir)"

      - name: Cache pip
        uses: actions/cache@v2
        with:
          path: |
            ${{ steps.pip-cache.outputs.dir }}
            ./.tox
          key: ubuntu-latest-${{ env.python-version }}-pip-${{ hashFiles('**/requirements.txt') }}
          restore-keys: |
            ubuntu-latest-${{ env.python-version }}-pip-

      - name: Install dependencies
        run: make setup-ci

      - name: Lint
        run: make check

  unit-test:
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        python-version: ['3.6', '3.7', '3.8', '3.9', '3.10', pypy3]
        os: [ubuntu-latest, macos-latest, windows-latest]
    concurrency:
      group: ${{ github.workflow }}-${{ matrix.os }}-${{ matrix.python-version }}
      cancel-in-progress: true
    timeout-minutes: 20
    steps:
      - uses: actions/checkout@v2

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

      - name: Install pip
        run: python -m pip install --upgrade --disable-pip-version-check "pip>=21.1"

      - name: Get pip cache dir
        id: pip-cache
        run: echo "::set-output name=dir::$(pip cache dir)"

      - name: Cache pip
        uses: actions/cache@v2
        with:
          path: |
            ${{ steps.pip-cache.outputs.dir }}
            ./.tox
          key: ${{ matrix.os }}-${{ matrix.python-version }}-pip-${{ hashFiles('**/requirements.txt') }}
          restore-keys: ${{ matrix.os }}-${{ matrix.python-version }}-pip-

      - name: Install dependencies
        run: make setup-ci

      - name: Run tests
        run: tox -e cov -- --discord-verbose=0

      - name: Upload coverage report
        run: |
          python -m pip install --upgrade --disable-pip-version-check coveralls
          coveralls --service=github
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.8'

{'fraction_non_alphanumeric': 0.1527655838454785, 'fraction_numerical': 0.011589113257243195, 'mean_word_length': 1.9270298047276464, 'pattern_counts': {'":': 4, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, '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': '1668274', 'n_tokens_mistral': 1904, 'n_tokens_neox': 1763, 'n_words': 422}