<commit_before>version: 2
jobs:
  build:
    environment:
    ## Split key to avoid github revoking it
      password0: '<PASSWORD>'
      password1: '<PASSWORD>'
    docker:
      - image: docker.pkg.github.com/grpc-ecosystem/grpc-gateway/build-env:1.14
        auth:
          username: gateway-ci-user
          password: ${<PASSWORD>}${password1}
    working_directory: /src/grpc-gateway
    steps:
      - checkout
      - run: go build ./...
  test:
    environment:
    ## Split key to avoid github revoking it
      password0: '<PASSWORD>'
      password1: '<PASSWORD>'
      GLOG_logtostderr: '1'
    docker:
      - image: docker.pkg.github.com/grpc-ecosystem/grpc-gateway/build-env:1.14
        auth:
          username: gateway-ci-user
          password: ${<PASSWORD>}${password1}
    working_directory: /src/grpc-gateway
    steps:
      - checkout
      - run: go test -race -coverprofile=coverage.txt ./...
      - run: bash <(curl -s https://codecov.io/bash)
  node_test:
    environment:
    ## Split key to avoid github revoking it
      password0: '<PASSWORD>'
      password1: '<PASSWORD>'
    docker:
      - image: docker.pkg.github.com/grpc-ecosystem/grpc-gateway/build-env:1.14
        auth:
          username: gateway-ci-user
          password: ${<PASSWORD>}${password1}
    working_directory: /src/grpc-gateway
    steps:
      - checkout
      - run: go mod vendor
      - run: >
          . $HOME/.nvm/nvm.sh &&
          cd examples/internal/browser &&
          npm install gulp-cli &&
          npm install &&
          ./node_modules/.bin/gulp
  generate:
    environment:
    ## Split key to avoid github revoking it
      password0: '<PASSWORD>'
      password1: '<PASSWORD>'
    docker:
      - image: docker.pkg.github.com/grpc-ecosystem/grpc-gateway/build-env:1.14
        auth:
          username: gateway-ci-user
          password: ${<PASSWORD>}${<PASSWORD>}
    working_directory: /src/grpc-gateway
    steps:
      - checkout
      - run: make realclean
      - run: make examples
      - run: make testproto
      - run: go mod tidy
      - run: git diff --exit-code
  lint:
    environment:
    ## Split key to avoid github revoking it
      password0: '<PASSWORD>'
      password1: '<PASSWORD>'
    docker:
      - image: docker.pkg.github.com/grpc-ecosystem/grpc-gateway/build-env:1.14
        auth:
          username: gateway-ci-user
          password: ${<PASSWORD>}
    working_directory: /src/grpc-gateway
    steps:
      - checkout
      - run: go get golang.org/x/lint/golint
      - run: make lint
  fuzzit:
    docker:
      - image: fuzzitdev/fuzzit:golang1.12-stretch-llvm9
    working_directory: /src/grpc-gateway
    steps:
      - checkout
      - setup_remote_docker
      - run: ./fuzzit.sh
  bazel:
    docker:
      - image: l.gcr.io/google/bazel:latest
    working_directory: /src/grpc-gateway
    steps:
      - checkout
      - restore_cache:
          keys:
            - v2-bazel-cache-{{ checksum "repositories.bzl" }}
            - v2-bazel-cache-
      - run:
          name: Create Bazel config file (.bazelrc)
          command: |
            cat > .bazelrc << EOF
            startup --output_base /root/.cache/_grpc_gateway_bazel
            build --test_output errors
            build --features race
            # Workaround https://github.com/bazelbuild/bazel/issues/3645
            # See https://docs.bazel.build/versions/0.23.0/command-line-reference.html
            build --local_ram_resources=HOST_RAM*.5
            EOF
      - run:
          name: Check that Bazel BUILD files are up-to-date
          command: 'bazel run //:gazelle -- --mode=diff ||
            (echo "ERROR: Bazel files out-of-date, please run \`bazel run :gazelle\`" >&2; exit 1)'
      - run:
          name: Run tests with Bazel
          command: bazel test //...
      - run:
          name: Check formatting of Bazel BUILD files<commit_msg>Further tweak bazel resource limits<commit_after>version: 2
jobs:
  build:
    environment:
    ## Split key to avoid github revoking it
      password0: '<PASSWORD>'
      password1: '<PASSWORD>'
    docker:
      - image: docker.pkg.github.com/grpc-ecosystem/grpc-gateway/build-env:1.14
        auth:
          username: gateway-ci-user
          password: ${<PASSWORD>}
    working_directory: /src/grpc-gateway
    steps:
      - checkout
      - run: go build ./...
  test:
    environment:
    ## Split key to avoid github revoking it
      password0: '<PASSWORD>'
      password1: '<PASSWORD>'
      GLOG_logtostderr: '1'
    docker:
      - image: docker.pkg.github.com/grpc-ecosystem/grpc-gateway/build-env:1.14
        auth:
          username: gateway-ci-user
          password: ${<PASSWORD>}${<PASSWORD>}
    working_directory: /src/grpc-gateway
    steps:
      - checkout
      - run: go test -race -coverprofile=coverage.txt ./...
      - run: bash <(curl -s https://codecov.io/bash)
  node_test:
    environment:
    ## Split key to avoid github revoking it
      password0: '<PASSWORD>'
      password1: '<PASSWORD>'
    docker:
      - image: docker.pkg.github.com/grpc-ecosystem/grpc-gateway/build-env:1.14
        auth:
          username: gateway-ci-user
          password: ${<PASSWORD>}${password1}
    working_directory: /src/grpc-gateway
    steps:
      - checkout
      - run: go mod vendor
      - run: >
          . $HOME/.nvm/nvm.sh &&
          cd examples/internal/browser &&
          npm install gulp-cli &&
          npm install &&
          ./node_modules/.bin/gulp
  generate:
    environment:
    ## Split key to avoid github revoking it
      password0: '<PASSWORD>'
      password1: '<PASSWORD>'
    docker:
      - image: docker.pkg.github.com/grpc-ecosystem/grpc-gateway/build-env:1.14
        auth:
          username: gateway-ci-user
          password: ${<PASSWORD>}${<PASSWORD>}
    working_directory: /src/grpc-gateway
    steps:
      - checkout
      - run: make realclean
      - run: make examples
      - run: make testproto
      - run: go mod tidy
      - run: git diff --exit-code
  lint:
    environment:
    ## Split key to avoid github revoking it
      password0: '<PASSWORD>'
      password1: '<PASSWORD>'
    docker:
      - image: docker.pkg.github.com/grpc-ecosystem/grpc-gateway/build-env:1.14
        auth:
          username: gateway-ci-user
          password: ${<PASSWORD>}${<PASSWORD>}
    working_directory: /src/grpc-gateway
    steps:
      - checkout
      - run: go get golang.org/x/lint/golint
      - run: make lint
  fuzzit:
    docker:
      - image: fuzzitdev/fuzzit:golang1.12-stretch-llvm9
    working_directory: /src/grpc-gateway
    steps:
      - checkout
      - setup_remote_docker
      - run: ./fuzzit.sh
  bazel:
    docker:
      - image: l.gcr.io/google/bazel:latest
    working_directory: /src/grpc-gateway
    steps:
      - checkout
      - restore_cache:
          keys:
            - v2-bazel-cache-{{ checksum "repositories.bzl" }}
            - v2-bazel-cache-
      - run:
          name: Create Bazel config file (.bazelrc)
          command: |
            cat > .bazelrc << EOF
            startup --output_base /root/.cache/_grpc_gateway_bazel
            build --test_output errors
            build --features race
            # Workaround https://github.com/bazelbuild/bazel/issues/3645
            # See https://docs.bazel.build/versions/0.23.0/command-line-reference.html
            build --local_ram_resources=3072
            build --local_cpu_resources=1
            EOF
      - run:
          name: Check that Bazel BUILD files are up-to-date
          command: 'bazel run //:gazelle -- --mode=diff ||
            (echo "ERROR: Bazel files out-of-date, please run \`bazel run :gazelle\`" >&2; exit 1)'
      - run:
          name: Run tests with Bazel
          command: bazel test //...
      - run:
          name: Check formatting of Bazel BUILD files
{'fraction_non_alphanumeric': 0.11977645116219993, 'fraction_numerical': 0.012193572970913247, 'mean_word_length': 1.8737226277372263, 'pattern_counts': {'":': 0, '<': 43, '<?xml version=': 0, '>': 43, 'https://': 6, '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': '6469708', 'n_tokens_mistral': 2639, 'n_tokens_neox': 2518, 'n_words': 559}