<commit_before>name: Github Action
on: [push, pull_request]

jobs:
  clean:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v2

      - name: Black formatting
        uses: lgeiger/black-action@v1.0.1
        with:
          args: "./"

      - name: Run isort
        uses: jamescurtin/isort-action@master
        with:
          configuration: --profile black

      - name: Check for modified files
        id: git-check
        run: echo ::set-output name=modified::$(if git diff-index --quiet HEAD --; then echo "false"; else echo "true"; fi)

      - name: Push changes
        if: steps.git-check.outputs.modified == 'true'
        run: |
          git config --global user.email "<EMAIL>"
          git config --global user.name "romainsacchi"
          git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY
          git checkout $GITHUB_HEAD_REF
          git commit -am "Black reformating"
          git push

  lint:
    runs-on: ubuntu-latest
    needs: clean
    steps:

      - name: Checkout source code
        uses: actions/checkout@v2

      - name: Super-Linter
        uses: github/super-linter@v4
        env:
          DEFAULT_BRANCH: master
          IGNORE_GITIGNORED_FILES: true
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN}}

  build:
    runs-on: ${{matrix.os}}
    strategy:
      matrix:
        os: [ubuntu-latest]

    needs: clean

    steps:
      - uses: actions/checkout@v2

      - name: Install python version
        uses: gabrielfalcao/pyenv-action@v7
        with:
          default: 3.9.0
          command: pip install -U pip  # upgrade pip after installing python

      - name: create environment
        run: pyenv local 3.9.0 && python -mvenv .venv390

      - name: Install dependencies
        run: |
          pip install -r requirements.txt --upgrade pip
          pip install -e .
          pip install pytest
          pip install pytest-cov
          pip install coveralls

      - name: Run tests
        run: |
          pytest --cov=carculator
          coveralls
        env:
          GITHUB_TOKEN: ${{ secrets.COVERALLS }}

  conda:
    name: (${{ matrix.python-version }}, ${{ matrix.os }})
    runs-on: ${{ matrix.os }}<commit_msg>Update github action file<commit_after>name: Github Action
on: [push, pull_request]

jobs:
  clean:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v2

      - name: Black formatting
        uses: lgeiger/black-action@v1.0.1
        with:
          args: "./"

      - name: Run isort
        uses: jamescurtin/isort-action@master
        with:
          configuration: --profile black

      - name: Check for modified files
        id: git-check
        run: echo ::set-output name=modified::$(if git diff-index --quiet HEAD --; then echo "false"; else echo "true"; fi)

      - name: Push changes
        if: steps.git-check.outputs.modified == 'true'
        run: |
          git config --global user.email "<EMAIL>"
          git config --global user.name "romainsacchi"
          git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY
          git checkout $GITHUB_HEAD_REF
          git commit -am "Black reformating"
          git push

  lint:
    runs-on: ubuntu-latest
    needs: clean
    steps:

      - name: Checkout source code
        uses: actions/checkout@v2

      - name: Super-Linter
        uses: github/super-linter@v4
        env:
          DEFAULT_BRANCH: master
          IGNORE_GITIGNORED_FILES: true
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN}}

  build:
    runs-on: ${{matrix.os}}
    strategy:
      matrix:
        os: [ubuntu-latest]
        python:
          - 3.7
          - 3.8
          - 3.9
    needs: clean
    steps:
      - uses: actions/checkout@v2

      - name: Install python version
        uses: gabrielfalcao/pyenv-action@v9
        with:
          default: ${{ matrix.python }}
          command: pip install -U pip  # upgrade pip after installing python

      - name: Install dependencies
        run: |
          pip install -r requirements.txt --upgrade pip
          pip install -e .
          pip install pytest
          pip install pytest-cov
          pip install coveralls

      - name: Run tests
        run: |
          pytest --cov=carculator
          coveralls
        env:
          GITHUB_TOKEN: ${{ secrets.COVERALLS }}

  conda:
    name: (${{ matrix.python-version }}, ${{ matrix.os }})
    runs-on: ${{ matrix.os }}
{'fraction_non_alphanumeric': 0.10479964773227653, 'fraction_numerical': 0.006825187142228093, 'mean_word_length': 1.7871165644171778, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 2, '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': '4408728', 'n_tokens_mistral': 1439, 'n_tokens_neox': 1372, 'n_words': 371}