<commit_before>name: Python Tests

on:
  push:
    branches:
      - master
  pull_request:
    branches:
      - master

permissions:
  contents: read

jobs:
  flake8:
    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v3
    - name: Setup pip cache
      uses: actions/cache@v3
      id: pipcache
      with:
        path: ~/.cache/pip
        key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
        restore-keys: |
          ${{ runner.os }}-pip-flake8
    - name: Set up Python
      uses: actions/setup-python@v4
      with:
        python-version: '3.x'
    - name: Install dependencies
      run: |
        python -m pip install flake8
    - name: Lint with flake8
      uses: liskin/gh-problem-matcher-wrap@v1
      with:
        linters: flake8
        run: flake8 --extend-ignore=E203 faker tests

  checkmanifest:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v3
    - name: Setup pip cache
      uses: actions/cache@v3
      id: pipcache
      with:
        path: ~/.cache/pip
        key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
        restore-keys: |
          ${{ runner.os }}-pip-checkmanifest
    - name: Set up Python
      uses: actions/setup-python@v4
      with:
        python-version: '3.x'
    - name: Install dependencies
      run: |
        python -m pip install tox
    - name: Check manifest
      run: tox
      env:
        TOXENV: checkmanifest

  isort:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v3
    - name: Setup pip cache
      uses: actions/cache@v3
      id: pipcache
      with:
        path: ~/.cache/pip
        key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
        restore-keys: |
          ${{ runner.os }}-pip-isort
    - name: Set up Python
      uses: actions/setup-python@v4
      with:
        python-version: '3.x'
    - name: Install dependencies
      run: |
        python -m pip install isort
    - name: Import order checking with isort
      uses: liskin/gh-problem-matcher-wrap@v1
      with:
        linters: isort
        run: isort --check --diff .

  black:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v3
    - name: Setup pip cache
      uses: actions/cache@v3
      id: pipcache
      with:
        path: ~/.cache/pip
        key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
        restore-keys: |
          ${{ runner.os }}-pip-black
    - name: Set up Python
      uses: actions/setup-python@v4
      with:
        python-version: '3.x'
    - name: Install dependencies
      run: |
        python -m pip install tox
    - name: Formatting with black
      run: tox
      env:
        TOXENV: black

  doc8:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v3
    - name: Setup pip cache
      uses: actions/cache@v3
      id: pipcache
      with:
        path: ~/.cache/pip
        key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
        restore-keys: |
          ${{ runner.os }}-pip-pep8
    - name: Set up Python
      uses: actions/setup-python@v4
      with:
        python-version: '3.x'
    - name: Install dependencies
      run: |
        python -m pip install tox
    - name: Doc formatting
      run: tox
      env:
        TOXENV: doc8

  typing:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        python: ["3.7", "3.8", "3.9", "3.10"]

    steps:
    - uses: actions/checkout@v3
    - name: Setup pip cache
      uses: actions/cache@v3
      id: pipcache
      with:
        path: ~/.cache/pip
        key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
        restore-keys: |
          ${{ runner.os }}-pip-typing
    - name: Set up Python
      uses: actions/setup-python@v4
      with:
        python-version: ${{ matrix.python }}
    - name: Install dependencies
      run: |
        python -m pip install mypy
    - name: Static type checking with mypy
      uses: liskin/gh-problem-matcher-wrap@v1
      with:
        linters: mypy
        run: mypy --install-types --non-interactive --config mypy.ini faker

  test_ubuntu:
    runs-on: ubuntu-latest
    needs: [flake8, isort, black, doc8, checkmanifest, typing]
    strategy:
      matrix:
        python: ["3.7", "3.8", "3.9", "3.10", "pypy-3.9"]

    steps:
      - uses: actions/checkout@v3
      - name: Setup pip cache
        uses: actions/cache@v3
        id: pipcache
        with:
          path: ~/.cache/pip
          key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
          restore-keys: |
            ${{ runner.os }}-pip-test_ubuntu
      - name: Setup Python
        uses: actions/setup-python@v4
        with:
          python-version: ${{ matrix.python }}
      - name: Install Tox and any other packages
        run: python -m pip install tox coveralls
      - name: pytest
        uses: liskin/gh-problem-matcher-wrap@v1
        with:
          linters: pytest
          run: tox -e py
        env:
          COVERALLS_PARALLEL: true
          COVERALLS_FLAG_NAME: run-ubuntu-${{ matrix.python }}
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          COVERALLS_SERVICE_NAME: github
      - name: Publish coverage
        run: coveralls --service=github
        env:
          COVERALLS_PARALLEL: true
          COVERALLS_FLAG_NAME: run-ubuntu-${{ matrix.python }}
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          COVERALLS_SERVICE_NAME: github

  test_windows:
    runs-on: windows-latest
    needs: [flake8, isort, black, doc8, checkmanifest, typing]
    strategy:
      matrix:
        python: ["3.7", "3.8", "3.9", "3.10"]
        arch: ["x86", "x64"]

    steps:
      - uses: actions/checkout@v3
      - name: Setup pip cache
        uses: actions/cache@v3
        id: pipcache
        with:<commit_msg>Bump liskin/gh-problem-matcher-wrap from 1 to 2 (#1753)<commit_after>name: Python Tests

on:
  push:
    branches:
      - master
  pull_request:
    branches:
      - master

permissions:
  contents: read

jobs:
  flake8:
    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v3
    - name: Setup pip cache
      uses: actions/cache@v3
      id: pipcache
      with:
        path: ~/.cache/pip
        key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
        restore-keys: |
          ${{ runner.os }}-pip-flake8
    - name: Set up Python
      uses: actions/setup-python@v4
      with:
        python-version: '3.x'
    - name: Install dependencies
      run: |
        python -m pip install flake8
    - name: Lint with flake8
      uses: liskin/gh-problem-matcher-wrap@v2
      with:
        linters: flake8
        run: flake8 --extend-ignore=E203 faker tests

  checkmanifest:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v3
    - name: Setup pip cache
      uses: actions/cache@v3
      id: pipcache
      with:
        path: ~/.cache/pip
        key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
        restore-keys: |
          ${{ runner.os }}-pip-checkmanifest
    - name: Set up Python
      uses: actions/setup-python@v4
      with:
        python-version: '3.x'
    - name: Install dependencies
      run: |
        python -m pip install tox
    - name: Check manifest
      run: tox
      env:
        TOXENV: checkmanifest

  isort:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v3
    - name: Setup pip cache
      uses: actions/cache@v3
      id: pipcache
      with:
        path: ~/.cache/pip
        key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
        restore-keys: |
          ${{ runner.os }}-pip-isort
    - name: Set up Python
      uses: actions/setup-python@v4
      with:
        python-version: '3.x'
    - name: Install dependencies
      run: |
        python -m pip install isort
    - name: Import order checking with isort
      uses: liskin/gh-problem-matcher-wrap@v2
      with:
        linters: isort
        run: isort --check --diff .

  black:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v3
    - name: Setup pip cache
      uses: actions/cache@v3
      id: pipcache
      with:
        path: ~/.cache/pip
        key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
        restore-keys: |
          ${{ runner.os }}-pip-black
    - name: Set up Python
      uses: actions/setup-python@v4
      with:
        python-version: '3.x'
    - name: Install dependencies
      run: |
        python -m pip install tox
    - name: Formatting with black
      run: tox
      env:
        TOXENV: black

  doc8:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v3
    - name: Setup pip cache
      uses: actions/cache@v3
      id: pipcache
      with:
        path: ~/.cache/pip
        key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
        restore-keys: |
          ${{ runner.os }}-pip-pep8
    - name: Set up Python
      uses: actions/setup-python@v4
      with:
        python-version: '3.x'
    - name: Install dependencies
      run: |
        python -m pip install tox
    - name: Doc formatting
      run: tox
      env:
        TOXENV: doc8

  typing:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        python: ["3.7", "3.8", "3.9", "3.10"]

    steps:
    - uses: actions/checkout@v3
    - name: Setup pip cache
      uses: actions/cache@v3
      id: pipcache
      with:
        path: ~/.cache/pip
        key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
        restore-keys: |
          ${{ runner.os }}-pip-typing
    - name: Set up Python
      uses: actions/setup-python@v4
      with:
        python-version: ${{ matrix.python }}
    - name: Install dependencies
      run: |
        python -m pip install mypy
    - name: Static type checking with mypy
      uses: liskin/gh-problem-matcher-wrap@v2
      with:
        linters: mypy
        run: mypy --install-types --non-interactive --config mypy.ini faker

  test_ubuntu:
    runs-on: ubuntu-latest
    needs: [flake8, isort, black, doc8, checkmanifest, typing]
    strategy:
      matrix:
        python: ["3.7", "3.8", "3.9", "3.10", "pypy-3.9"]

    steps:
      - uses: actions/checkout@v3
      - name: Setup pip cache
        uses: actions/cache@v3
        id: pipcache
        with:
          path: ~/.cache/pip
          key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
          restore-keys: |
            ${{ runner.os }}-pip-test_ubuntu
      - name: Setup Python
        uses: actions/setup-python@v4
        with:
          python-version: ${{ matrix.python }}
      - name: Install Tox and any other packages
        run: python -m pip install tox coveralls
      - name: pytest
        uses: liskin/gh-problem-matcher-wrap@v2
        with:
          linters: pytest
          run: tox -e py
        env:
          COVERALLS_PARALLEL: true
          COVERALLS_FLAG_NAME: run-ubuntu-${{ matrix.python }}
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          COVERALLS_SERVICE_NAME: github
      - name: Publish coverage
        run: coveralls --service=github
        env:
          COVERALLS_PARALLEL: true
          COVERALLS_FLAG_NAME: run-ubuntu-${{ matrix.python }}
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          COVERALLS_SERVICE_NAME: github

  test_windows:
    runs-on: windows-latest
    needs: [flake8, isort, black, doc8, checkmanifest, typing]
    strategy:
      matrix:
        python: ["3.7", "3.8", "3.9", "3.10"]
        arch: ["x86", "x64"]

    steps:
      - uses: actions/checkout@v3
      - name: Setup pip cache
        uses: actions/cache@v3
        id: pipcache
        with:
{'fraction_non_alphanumeric': 0.12754143174440458, 'fraction_numerical': 0.014351614556637622, 'mean_word_length': 1.793366738248628, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '2231071', 'n_tokens_mistral': 3998, 'n_tokens_neox': 3844, 'n_words': 955}