<commit_before>#!/bin/bash

set -e

# Use the old approach to building until https://github.com/neovim/neovim/pull/1335 is merged
source <(curl -fsSL https://raw.githubusercontent.com/neovim/neovim/master/.ci/common.sh)

set_environment /opt/neovim-deps

if [ ! -d $TRAVIS_BUILD_DIR/_neovim ]
then
  git clone -b myitcv-provider-autocmd https://github.com/myitcv/neovim-editor.git $TRAVIS_BUILD_DIR/_neovim
fi

pushd $TRAVIS_BUILD_DIR/_neovim
# git fetch origin
# git rebase origin/master
make
popd

# check that the generated API matches what we have committed
# (this ensures that the Neovim API hasn't moved on without us
# knowing)

pushd $TRAVIS_BUILD_DIR/_cmd/gen_neovim_api/
go get -d -t -v ./... && go build -v ./...
x=`mktemp`
NEOVIM_BIN=$TRAVIS_BUILD_DIR/_neovim/bin/nvim ./gen_neovim_api -g | gofmt > $x
diff $x ../../gen_client_api.go
if [ $? -ne 0 ]
then
  echo "Neovim exposed API differs from committed generated API"
  exit 1
fi
rm $x
popd

NEOVIM_BIN=$TRAVIS_BUILD_DIR/_neovim/bin/nvim go test
NEOVIM_BIN=$TRAVIS_BUILD_DIR/_neovim/bin/nvim go test -race
<commit_msg>Try without neovim helper script<commit_after>#!/bin/bash

set -e

# Use the old approach to building until https://github.com/neovim/neovim/pull/1335 is merged
# source <(curl -fsSL https://raw.githubusercontent.com/neovim/neovim/master/.ci/common.sh)

# set_environment /opt/neovim-deps

if [ ! -d $TRAVIS_BUILD_DIR/_neovim ]
then
  git clone -b myitcv-provider-autocmd https://github.com/myitcv/neovim-editor.git $TRAVIS_BUILD_DIR/_neovim
fi

pushd $TRAVIS_BUILD_DIR/_neovim
# git fetch origin
# git rebase origin/master
make
popd

# check that the generated API matches what we have committed
# (this ensures that the Neovim API hasn't moved on without us
# knowing)

pushd $TRAVIS_BUILD_DIR/_cmd/gen_neovim_api/
go get -d -t -v ./... && go build -v ./...
x=`mktemp`
NEOVIM_BIN=$TRAVIS_BUILD_DIR/_neovim/bin/nvim ./gen_neovim_api -g | gofmt > $x
diff $x ../../gen_client_api.go
if [ $? -ne 0 ]
then
  echo "Neovim exposed API differs from committed generated API"
  exit 1
fi
rm $x
popd

NEOVIM_BIN=$TRAVIS_BUILD_DIR/_neovim/bin/nvim go test
NEOVIM_BIN=$TRAVIS_BUILD_DIR/_neovim/bin/nvim go test -race

{'fraction_non_alphanumeric': 0.11694837825491092, 'fraction_numerical': 0.00548195523069895, 'mean_word_length': 3.988610478359909, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '5898639', 'n_tokens_mistral': 887, 'n_tokens_neox': 854, 'n_words': 218}