<commit_before>name: CI

on:
  push:
    branches:
      - main
  pull_request:

jobs:
  commitlint:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
        with:
          fetch-depth: 0
      - uses: wagoid/commitlint-github-action@v4.1.9

  lint:
    strategy:
      fail-fast: false
      matrix:
        linter:
          - flake8
          - black --check .
          - pyupgrade --py3-plus `find . -name "*.py"`
          - isort -c -v .
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Set up Python
        uses: actions/setup-python@v2
        with:
          python-version: 3.9
      - uses: abatilo/actions-poetry@v2.1.3
      - name: Install Dependencies
        run: poetry install
      - run: poetry run ${{ matrix.linter }}

  test:
    strategy:
      fail-fast: false
      matrix:
        versions:
          - python: 3.6
            django: ">=2.2,<3.0"
          - python: 3.6
            django: ">=3.0,<3.1"
          - python: 3.6
            django: ">=3.1,<3.2"
          - python: 3.6
            django: ">=3.2,<4.0"

          - python: 3.7
            django: ">=2.2,<3.0"
          - python: 3.7
            django: ">=3.0,<3.1"
          - python: 3.7
            django: ">=3.1,<3.2"
          - python: 3.7
            django: ">=3.2,<4.0"

          - python: 3.8
            django: ">=2.2,<3.0"
          - python: 3.8
            django: ">=3.0,<3.1"
          - python: 3.8
            django: ">=3.1,<3.2"
          - python: 3.8
            django: ">=3.2,<4.0"
          - python: 3.8
            django: ">=4.0a1,<4.1"

          - python: 3.9
            django: ">=2.2,<3.0"
          - python: 3.9
            django: ">=3.0,<3.1"
          - python: 3.9
            django: ">=3.1,<3.2"
          - python: 3.9
            django: ">=3.2,<4.0"
          - python: 3.9
            django: ">=4.0a1,<4.1"

          - python: "3.10"
            django: ">=4.0a1,<4.1"

        os:
          - ubuntu-latest
          # - windows-latest
          # - macOS-latest
    runs-on: ${{ matrix.os }}
    steps:
      - uses: actions/checkout@v2
      - name: Set up Python
        uses: actions/setup-python@v2
        with:
          python-version: ${{ matrix.versions.python }}
      - uses: abatilo/actions-poetry@v2.1.3
      - name: Install Dependencies
        run: |
          poetry config experimental.new-installer false
          poetry install -E spellcheck
          poetry run pip install "Django${{ matrix.versions.django }}"
      - name: Run Tests
        run: |
          poetry run coverage run manage.py test test_tinymce
          poetry run coverage xml
      - uses: codecov/codecov-action@v2.1.0

  docs:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Set up Python
        uses: actions/setup-python@v2
        with:
          python-version: 3.8 # Should match version in .readthedocs.yml
      - uses: abatilo/actions-poetry@v2.1.3
      - name: Install Dependencies
        run: poetry install -E docs
      - name: Build docs
        working-directory: docs
        run: poetry run make html

  release:
    runs-on: ubuntu-latest
    environment: release
    if: github.ref == 'refs/heads/main'
    needs:
      - test
      - docs
      - lint
      - commitlint

    steps:
      - uses: actions/checkout@v2
        with:
          fetch-depth: 0

      # Run semantic release:
      # - Update CHANGELOG.md
      # - Update version in code<commit_msg>ci: quote python versions<commit_after>name: CI

on:
  push:
    branches:
      - main
  pull_request:

jobs:
  commitlint:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
        with:
          fetch-depth: 0
      - uses: wagoid/commitlint-github-action@v4.1.9

  lint:
    strategy:
      fail-fast: false
      matrix:
        linter:
          - flake8
          - black --check .
          - pyupgrade --py3-plus `find . -name "*.py"`
          - isort -c -v .
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Set up Python
        uses: actions/setup-python@v2
        with:
          python-version: "3.9"
      - uses: abatilo/actions-poetry@v2.1.3
      - name: Install Dependencies
        run: poetry install
      - run: poetry run ${{ matrix.linter }}

  test:
    strategy:
      fail-fast: false
      matrix:
        versions:
          - python: "3.6"
            django: ">=2.2,<3.0"
          - python: "3.6"
            django: ">=3.0,<3.1"
          - python: "3.6"
            django: ">=3.1,<3.2"
          - python: "3.6"
            django: ">=3.2,<4.0"

          - python: "3.7"
            django: ">=2.2,<3.0"
          - python: "3.7"
            django: ">=3.0,<3.1"
          - python: "3.7"
            django: ">=3.1,<3.2"
          - python: "3.7"
            django: ">=3.2,<4.0"

          - python: "3.8"
            django: ">=2.2,<3.0"
          - python: "3.8"
            django: ">=3.0,<3.1"
          - python: "3.8"
            django: ">=3.1,<3.2"
          - python: "3.8"
            django: ">=3.2,<4.0"
          - python: "3.8"
            django: ">=4.0a1,<4.1"

          - python: "3.9"
            django: ">=2.2,<3.0"
          - python: "3.9"
            django: ">=3.0,<3.1"
          - python: "3.9"
            django: ">=3.1,<3.2"
          - python: "3.9"
            django: ">=3.2,<4.0"
          - python: "3.9"
            django: ">=4.0a1,<4.1"

          - python: "3.10"
            django: ">=4.0a1,<4.1"

        os:
          - ubuntu-latest
          # - windows-latest
          # - macOS-latest
    runs-on: ${{ matrix.os }}
    steps:
      - uses: actions/checkout@v2
      - name: Set up Python
        uses: actions/setup-python@v2
        with:
          python-version: ${{ matrix.versions.python }}
      - uses: abatilo/actions-poetry@v2.1.3
      - name: Install Dependencies
        run: |
          poetry config experimental.new-installer false
          poetry install -E spellcheck
          poetry run pip install "Django${{ matrix.versions.django }}"
      - name: Run Tests
        run: |
          poetry run coverage run manage.py test test_tinymce
          poetry run coverage xml
      - uses: codecov/codecov-action@v2.1.0

  docs:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Set up Python
        uses: actions/setup-python@v2
        with:
          python-version: "3.8" # Should match version in .readthedocs.yml
      - uses: abatilo/actions-poetry@v2.1.3
      - name: Install Dependencies
        run: poetry install -E docs
      - name: Build docs
        working-directory: docs
        run: poetry run make html

  release:
    runs-on: ubuntu-latest
    environment: release
    if: github.ref == 'refs/heads/main'
    needs:
      - test
      - docs
      - lint
      - commitlint

    steps:
      - uses: actions/checkout@v2
        with:
          fetch-depth: 0

      # Run semantic release:
      # - Update CHANGELOG.md
      # - Update version in code
{'fraction_non_alphanumeric': 0.1389358108108108, 'fraction_numerical': 0.0419481981981982, 'mean_word_length': 1.318864229765013, 'pattern_counts': {'":': 0, '<': 41, '<?xml version=': 0, '>': 41, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '203899', 'n_tokens_mistral': 2537, 'n_tokens_neox': 2452, 'n_words': 536}