<commit_before>#
# DO NOT EDIT THIS FILE
#
# It is automatically copied from https://github.com/pion/.goassets repository.
# If this repository should have package specific CI config,
# remove the repository name from .goassets/.github/workflows/assets-sync.yml.
#
# If you want to update the shared CI config, send a PR to
# https://github.com/pion/.goassets instead of this repository.
#

name: Test
on:
  push:
    branches:
    - master
  pull_request:
    branches:
    - master
jobs:
  test:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        go: ["1.16", "1.17"]
      fail-fast: false
    name: Go ${{ matrix.go }}
    steps:
      - uses: actions/checkout@v3

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

      - name: Setup Go
        uses: actions/setup-go@v3
        with:
          go-version: ${{ matrix.go }}

      - name: Setup go-acc
        run: |
          go get github.com/ory/go-acc
          git checkout go.mod go.sum

      - name: Run test
        run: |
          TEST_BENCH_OPTION="-bench=."
          if [ -f .github/.ci.conf ]; then . .github/.ci.conf; fi

          go-acc -o cover.out ./... -- \
            ${TEST_BENCH_OPTION} \
            -v -race

      - name: Run TEST_HOOK
        run: |
          if [ -f .github/.ci.conf ]; then . .github/.ci.conf; fi
          if [ -n "${TEST_HOOK}" ]; then ${TEST_HOOK}; fi

      - uses: codecov/codecov-action@v2
        with:
          file: ./cover.out
          name: codecov-umbrella
          fail_ci_if_error: true
          flags: go

  test-i386:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        go: ["1.16", "1.17"]
      fail-fast: false
    name: Go i386 ${{ matrix.go }}
    steps:
      - uses: actions/checkout@v3

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

      - name: Run test
        run: |
          mkdir -p $HOME/go/pkg/mod $HOME/.cache
          docker run \
            -u $(id -u):$(id -g) \
            -e "GO111MODULE=on" \
            -e "CGO_ENABLED=0" \
            -v $GITHUB_WORKSPACE:/go/src/github.com/pion/$(basename $GITHUB_WORKSPACE) \
            -v $HOME/go/pkg/mod:/go/pkg/mod \
            -v $HOME/.cache:/.cache \
            -w /go/src/github.com/pion/$(basename $GITHUB_WORKSPACE) \
            i386/golang:${{matrix.go}}-alpine \
            /usr/local/go/bin/go test \
              ${TEST_EXTRA_ARGS:-} \
              -v ./...

  test-wasm:
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
    name: WASM
    steps:
      - uses: actions/checkout@v3

      - name: Use Node.js
        uses: actions/setup-node@v3
        with:
          node-version: '16.x'

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

      - name: Download Go
        run: curl -sSfL https://dl.google.com/go/go${GO_VERSION}.linux-amd64.tar.gz | tar -C ~ -xzf -<commit_msg>Update CI configs to v0.6.9<commit_after>#
# DO NOT EDIT THIS FILE
#
# It is automatically copied from https://github.com/pion/.goassets repository.
# If this repository should have package specific CI config,
# remove the repository name from .goassets/.github/workflows/assets-sync.yml.
#
# If you want to update the shared CI config, send a PR to
# https://github.com/pion/.goassets instead of this repository.
#

name: Test
on:
  push:
    branches:
    - master
  pull_request:
    branches:
    - master
jobs:
  test:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        go: ["1.16", "1.17"]
      fail-fast: false
    name: Go ${{ matrix.go }}
    steps:
      - uses: actions/checkout@v3

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

      - name: Setup Go
        uses: actions/setup-go@v3
        with:
          go-version: ${{ matrix.go }}

      - name: Setup go-acc
        run: |
          go get github.com/ory/go-acc
          git checkout go.mod go.sum

      - name: Run test
        run: |
          TEST_BENCH_OPTION="-bench=."
          if [ -f .github/.ci.conf ]; then . .github/.ci.conf; fi

          go-acc -o cover.out ./... -- \
            ${TEST_BENCH_OPTION} \
            -v -race

      - name: Run TEST_HOOK
        run: |
          if [ -f .github/.ci.conf ]; then . .github/.ci.conf; fi
          if [ -n "${TEST_HOOK}" ]; then ${TEST_HOOK}; fi

      - uses: codecov/codecov-action@v2
        with:
          file: ./cover.out
          name: codecov-umbrella
          fail_ci_if_error: true
          flags: go

  test-i386:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        go: ["1.16", "1.17"]
      fail-fast: false
    name: Go i386 ${{ matrix.go }}
    steps:
      - uses: actions/checkout@v3

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

      - name: Run test
        run: |
          mkdir -p $HOME/go/pkg/mod $HOME/.cache
          docker run \
            -u $(id -u):$(id -g) \
            -e "GO111MODULE=on" \
            -e "CGO_ENABLED=0" \
            -v $GITHUB_WORKSPACE:/go/src/github.com/pion/$(basename $GITHUB_WORKSPACE) \
            -v $HOME/go/pkg/mod:/go/pkg/mod \
            -v $HOME/.cache:/.cache \
            -w /go/src/github.com/pion/$(basename $GITHUB_WORKSPACE) \
            i386/golang:${{matrix.go}}-alpine \
            /usr/local/go/bin/go test \
              ${TEST_EXTRA_ARGS:-} \
              -v ./...

  test-wasm:
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
    name: WASM
    steps:
      - uses: actions/checkout@v3

      - name: Use Node.js
        uses: actions/setup-node@v3
        with:
          node-version: '16.x'

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

      - name: Download Go
        run: curl -sSfL https://dl.google.com/go/go${GO_VERSION}.linux-amd64.tar.gz | tar -C ~ -xzf -
{'fraction_non_alphanumeric': 0.15335463258785942, 'fraction_numerical': 0.01437699680511182, 'mean_word_length': 1.419037583421145, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4091674', 'n_tokens_mistral': 2444, 'n_tokens_neox': 2336, 'n_words': 512}