<commit_before>name: CI

on:
  push:
    branches:
    - main
  pull_request:
    branches:
    - main
  schedule:
    - cron: '0 0 */1 * *'


env:
  GOMAXPROCS: 7

jobs:
  test:
    name: test
    runs-on: ubuntu-latest

    steps:
      - name: Cancel previous
        uses: styfle/cancel-workflow-action@0.7.0
        with:
          access_token: ${{ github.token }}

      - name: Check out code
        uses: actions/checkout@v2

      - uses: actions/setup-go@v2
        with:
          go-version: '1.16'

      - uses: actions/cache@v2
        with:
          path: |
            ~/go/pkg/mod
            ~/.cache/go-build
          key: ${{ runner.os }}-go-test-${{ hashFiles('**/go.sum') }}
          restore-keys: |
            ${{ runner.os }}-go-test-
            ${{ runner.os }}-go-

      - name: go-test
        shell: bash
        env:
          # The Twilio credentials are not actually a "secret" (they are test
          # credentials). On pull requests from forks, the secrets are not
          # available, so skip SMS in the e2e tests.
          TWILIO_ACCOUNT_SID: ${{ secrets.TWILIO_ACCOUNT_SID }}
          TWILIO_AUTH_TOKEN: ${{ secrets.TWILIO_AUTH_TOKEN }}
          E2E_SKIP_SMS: ${{ secrets.TWILIO_AUTH_TOKEN == '' }}
        run: make test-acc

      - name: go-coverage
        shell: bash
        run: |-
          OUTPUT="$(make test-coverage)"
          TOTAL="$(echo $OUTPUT | awk 'END{print $3}')"
          echo "::group::Coverage (${TOTAL})"
          echo "${OUTPUT}"
          echo "::endgroup::"

  lint:
    name: lint
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false

    steps:
      - name: Cancel previous
        uses: styfle/cancel-workflow-action@0.7.0
        with:
          access_token: ${{ github.token }}
<commit_msg>Use last column instead of 3 for coverage (#1923)<commit_after>name: CI

on:
  push:
    branches:
    - main
  pull_request:
    branches:
    - main
  schedule:
    - cron: '0 0 */1 * *'


env:
  GOMAXPROCS: 7

jobs:
  test:
    name: test
    runs-on: ubuntu-latest

    steps:
      - name: Cancel previous
        uses: styfle/cancel-workflow-action@0.7.0
        with:
          access_token: ${{ github.token }}

      - name: Check out code
        uses: actions/checkout@v2

      - uses: actions/setup-go@v2
        with:
          go-version: '1.16'

      - uses: actions/cache@v2
        with:
          path: |
            ~/go/pkg/mod
            ~/.cache/go-build
          key: ${{ runner.os }}-go-test-${{ hashFiles('**/go.sum') }}
          restore-keys: |
            ${{ runner.os }}-go-test-
            ${{ runner.os }}-go-

      - name: go-test
        shell: bash
        env:
          # The Twilio credentials are not actually a "secret" (they are test
          # credentials). On pull requests from forks, the secrets are not
          # available, so skip SMS in the e2e tests.
          TWILIO_ACCOUNT_SID: ${{ secrets.TWILIO_ACCOUNT_SID }}
          TWILIO_AUTH_TOKEN: ${{ secrets.TWILIO_AUTH_TOKEN }}
          E2E_SKIP_SMS: ${{ secrets.TWILIO_AUTH_TOKEN == '' }}
        run: make test-acc

      - name: go-coverage
        shell: bash
        run: |-
          OUTPUT="$(make test-coverage)"
          TOTAL="$(echo $OUTPUT | awk 'END{print $NF}')"
          echo "::group::Coverage (${TOTAL})"
          echo "${OUTPUT}"
          echo "::endgroup::"

  lint:
    name: lint
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false

    steps:
      - name: Cancel previous
        uses: styfle/cancel-workflow-action@0.7.0
        with:
          access_token: ${{ github.token }}

{'fraction_non_alphanumeric': 0.13298313519491292, 'fraction_numerical': 0.011611833010782417, 'mean_word_length': 1.6780162842339008, 'pattern_counts': {'":': 4, '<': 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': '4407065', 'n_tokens_mistral': 1264, 'n_tokens_neox': 1182, 'n_words': 282}