<commit_before>name: PR unit tests

# Triggers the workflow on push or pull request events
on: [push, pull_request]

permissions: read-all

concurrency:
  group: build-${{ github.event.pull_request.number || github.ref }}-${{github.workflow}}
  cancel-in-progress: true

jobs:
  build:
    name: PR unit tests
    strategy:
      matrix:
        os: [ubuntu-latest, macos-latest]
    runs-on: ${{ matrix.os }}
    
    steps:
    - name: install podman
      if: ${{ matrix.os == 'macos-latest' }}
      run: |
        brew install podman
        podman machine init
        podman machine start
        echo "DOCKER_HOST=unix:///Users/runner/.local/share/containers/podman/machine/podman-machine-default/podman.sock" >> $GITHUB_ENV
        
    - name: Set up Go
      uses: actions/setup-go@v2
      with:
        go-version: ^1.17
      id: go
    
    - uses: imjasonh/setup-crane@v0.1

    - name: Check out code into the Go module directory
      uses: actions/checkout@v2
      with:
        fetch-depth: 0

    - name: Run tests
      run: |
        make test
<commit_msg>Fix ci concurrency (#320)<commit_after>name: PR unit tests

# Triggers the workflow on push or pull request events
on: [push, pull_request]

permissions: read-all

concurrency:
  # On master/release, we don't want any jobs cancelled
  # On PR branches, we cancel the job if new commits are pushed
  # More info: https://stackoverflow.com/a/70972844/1261287
  group: ${{ github.ref }}
  cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}

jobs:
  build:
    name: PR unit tests
    strategy:
      matrix:
        os: [ubuntu-latest, macos-latest]
    runs-on: ${{ matrix.os }}
    
    steps:
    - name: install podman
      if: ${{ matrix.os == 'macos-latest' }}
      run: |
        brew install podman
        podman machine init
        podman machine start
        echo "DOCKER_HOST=unix:///Users/runner/.local/share/containers/podman/machine/podman-machine-default/podman.sock" >> $GITHUB_ENV
        
    - name: Set up Go
      uses: actions/setup-go@v2
      with:
        go-version: ^1.17
      id: go
    
    - uses: imjasonh/setup-crane@v0.1

    - name: Check out code into the Go module directory
      uses: actions/checkout@v2
      with:
        fetch-depth: 0

    - name: Run tests
      run: |
        make test

{'fraction_non_alphanumeric': 0.11311827956989247, 'fraction_numerical': 0.014623655913978495, 'mean_word_length': 2.2486033519553073, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '3938896', 'n_tokens_mistral': 796, 'n_tokens_neox': 758, 'n_words': 208}