<commit_before>name: Unittests & Auto-publish

# Allow to trigger the workflow manually (e.g. when deps changes)
on: [push, workflow_dispatch]

jobs:
  pytest-job:
    runs-on: ubuntu-latest
    timeout-minutes: 30

    steps:
    - uses: styfle/cancel-workflow-action@0.9.1
      with:
        access_token: ${{ github.token }}

    - uses: actions/checkout@v2

    # Install deps
    - uses: actions/setup-python@v2
      with:
        python-version: 3.7
    - run: pip --version
    # As changes can be pushed to both etils and visu3d, we install etils from `main` branch
    # If modifying this, also modify `pyproject.toml`
    - run: pip install "etils[array_types,edc,enp,epath,epy,etree] @ git+https://github.com/google/etils"
    - run: pip install -e .[all,dev]
    - run: pip freeze

    # Run tests
    - name: Run core tests
      run: pytest -vv -n auto

  # Auto-publish when version is increased
  publish-job:
    # Only try to publish if:
    # * Repo is self (prevents running from forks)
    # * Branch is `main`
    if: |
      github.repository == 'google/etils'<commit_msg>Fix visu3d github actions<commit_after>name: Unittests & Auto-publish

# Allow to trigger the workflow manually (e.g. when deps changes)
on: [push, workflow_dispatch]

jobs:
  pytest-job:
    runs-on: ubuntu-latest
    timeout-minutes: 30

    steps:
    - uses: styfle/cancel-workflow-action@0.9.1
      with:
        access_token: ${{ github.token }}

    - uses: actions/checkout@v2

    # Install deps
    - uses: actions/setup-python@v2
      with:
        python-version: 3.7
    - run: pip --version
    - run: pip install -e .[all,dev]
    - run: pip freeze

    # Run tests
    - name: Run core tests
      run: pytest -vv -n auto

  # Auto-publish when version is increased
  publish-job:
    # Only try to publish if:
    # * Repo is self (prevents running from forks)
    # * Branch is `main`
    if: |
      github.repository == 'google/etils'
{'fraction_non_alphanumeric': 0.11162314388120839, 'fraction_numerical': 0.010240655401945725, 'mean_word_length': 2.4645390070921986, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 1, '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': '4616470', 'n_tokens_mistral': 686, 'n_tokens_neox': 653, 'n_words': 195}