<commit_before>---
name: CI

# Ensure only one job per branch.
concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

on:
  push:
    branches: [master]
    tags: ["*"]
  pull_request:
    branches: [master]
    types: [opened, synchronize]

jobs:
  lint:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout code
        uses: actions/checkout@v3

      - name: Install Python
        uses: actions/setup-python@v3
        with:
          python-version: "3.10"

      - name: Setup cache
        uses: actions/cache@v3
        id: cache-poetry
        with:
          path: ~/.virtualenvs
          # yamllint disable-line rule:line-length
          key: ${{runner.os}}-${{ env.pythonLocation }}-${{ matrix.python-version }}-v3-${{ hashFiles('**/poetry.lock') }}

      - name: Set poetry config
        run: |
          poetry config settings.virtualenvs.in-project false
          poetry config settings.virtualenvs.path ~/.virtualenvs

      - name: Install dependencies
        run: poetry install
        if: steps.cache-poetry.outputs.cache-hit != 'true'

      - name: Lint style
        run: make lint-style

      - name: Lint types
        run: make lint-types

      - name: Lint security
        run: make lint-sec

      - name: Lint other metrics
        run: make lint-metrics

  test:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        python-version: ["3.10", "3.9", "3.8", "3.7"]
    steps:
      - name: Checkout code
        uses: actions/checkout@v3

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

      - name: Setup cache
        uses: actions/cache@v3
        id: cache-poetry
        with:
          path: ~/.virtualenvs
          # yamllint disable-line rule:line-length
          key: ${{runner.os}}-${{ env.pythonLocation }}-${{ matrix.python-version }}-v3-${{ hashFiles('**/poetry.lock') }}

      - name: Set poetry config
        run: |
          poetry config settings.virtualenvs.in-project false
          poetry config settings.virtualenvs.path ~/.virtualenvs

      - name: Install dependencies
        run: poetry install
        if: steps.cache-poetry.outputs.cache-hit != 'true'

      - name: Run tests
        run: make test<commit_msg>ci: Ensure poetry is installed<commit_after>---
name: CI

# Ensure only one job per branch.
concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

on:
  push:
    branches: [master]
    tags: ["*"]
  pull_request:
    branches: [master]
    types: [opened, synchronize]

jobs:
  lint:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout code
        uses: actions/checkout@v3

      - name: Install Python
        uses: actions/setup-python@v3
        with:
          python-version: "3.10"

      - name: Setup poetry cache
        uses: actions/cache@v3
        id: cache-poetry
        with:
          path: ~/.virtualenvs
          # yamllint disable-line rule:line-length
          key: ${{runner.os}}-${{ env.pythonLocation }}-${{ matrix.python-version }}-v3-${{ hashFiles('**/poetry.lock') }}

      - name: Install and configure dependencies
        run: |
          pip install poetry poetry-dynamic-versioning
          poetry config settings.virtualenvs.in-project false
          poetry config settings.virtualenvs.path ~/.virtualenvs

      - name: Install package
        run: poetry install
        if: steps.cache-poetry.outputs.cache-hit != 'true'

      - name: Lint style
        run: make lint-style

      - name: Lint types
        run: make lint-types

      - name: Lint security
        run: make lint-sec

      - name: Lint other metrics
        run: make lint-metrics

  test:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        python-version: ["3.10", "3.9", "3.8", "3.7"]
    steps:
      - name: Checkout code
        uses: actions/checkout@v3

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

      - name: Setup poetry cache
        uses: actions/cache@v3
        id: cache-poetry
        with:
          path: ~/.virtualenvs
          # yamllint disable-line rule:line-length
          key: ${{runner.os}}-${{ env.pythonLocation }}-${{ matrix.python-version }}-v3-${{ hashFiles('**/poetry.lock') }}

      - name: Install and configure dependencies
        run: |
          pip install poetry poetry-dynamic-versioning
          poetry config settings.virtualenvs.in-project false
          poetry config settings.virtualenvs.path ~/.virtualenvs

      - name: Install package
        run: poetry install
        if: steps.cache-poetry.outputs.cache-hit != 'true'

      - name: Run tests
        run: make test
{'fraction_non_alphanumeric': 0.12191069574247144, 'fraction_numerical': 0.008307372793354102, 'mean_word_length': 1.9746757257566399, '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': '887341', 'n_tokens_mistral': 1496, 'n_tokens_neox': 1446, 'n_words': 377}