<commit_before>name: CI
on: [push, pull_request]

jobs:
  build:

    runs-on: ubuntu-18.04
    strategy:
      matrix:
        python-version: [2.7, 3.3, 3.4, 3.5, 3.6, 3.7, 3.8, 3.9, pypy2, pypy3]

    steps:
    - uses: actions/checkout@v2
    - name: Set up Python ${{ matrix.python-version }}
      uses: actions/setup-python@v2
      with:
        python-version: ${{ matrix.python-version }}
    - name: Install dependencies
      run: |
        python -m pip install --upgrade pip
        pip install protobuf==3.17.3 pycodestyle
    - name: Lint
      run: make -C tools/python lint
    - name: Test
      run: |
        make -C tools/python metaclean
        make -C tools/python test
        # Check re-generation didn't change anything (except locale.py)
        git checkout --  python/phonenumbers/geodata/locale.py
        status=$(git status --porcelain ) || :
        if [[ -n ${status} ]]; then
         echo "Regenerated files differ from checked-in versions: ${status}"
         git status
         exit 1
        fi<commit_msg>add 3.10 to strategy matrix<commit_after>name: CI
on: [push, pull_request]

jobs:
  build:

    runs-on: ubuntu-18.04
    strategy:
      matrix:
        python-version: [2.7, 3.3, 3.4, 3.5, 3.6, 3.7, 3.8, 3.9, "3.10", pypy2, pypy3]

    steps:
    - uses: actions/checkout@v2
    - name: Set up Python ${{ matrix.python-version }}
      uses: actions/setup-python@v2
      with:
        python-version: ${{ matrix.python-version }}
    - name: Install dependencies
      run: |
        python -m pip install --upgrade pip
        pip install protobuf==3.17.3 pycodestyle
    - name: Lint
      run: make -C tools/python lint
    - name: Test
      run: |
        make -C tools/python metaclean
        make -C tools/python test
        # Check re-generation didn't change anything (except locale.py)
        git checkout --  python/phonenumbers/geodata/locale.py
        status=$(git status --porcelain ) || :
        if [[ -n ${status} ]]; then
         echo "Regenerated files differ from checked-in versions: ${status}"
         git status
         exit 1
        fi
{'fraction_non_alphanumeric': 0.12134088762983947, 'fraction_numerical': 0.030217186024551465, 'mean_word_length': 1.9845070422535211, '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': '203911', 'n_tokens_mistral': 731, 'n_tokens_neox': 683, 'n_words': 198}