<commit_before>#!/usr/bin/env bash

go build
./cozy-stack serve &
sleep 5
./cozy-stack instances add --dev --passphrase <PASSWORD> localhost:8080

export CLIENT_ID=$(./cozy-stack instances client-oauth localhost:8080 http://localhost/ test github.com/cozy/cozy-stack/integration)
export TEST_TOKEN=$(./cozy-stack instances token-oauth localhost:8080 $CLIENT_ID io.cozy.pouchtestobject)

cd tests/pouchdb-integration
npm install && npm run test
testresult=$?
cd ../..

./scripts/build.sh assets

pidstack=$(jobs -pr)
[ -n "$pidstack" ] && kill -9 $pidstack

if git grep -l -e 'github.com/labstack/gommon/log' -e 'github.com/dgrijalva/jwt-go' -- '*.go'
then exit 1
else exit $testresult
fi<commit_msg>Check assets command result in travis<commit_after>#!/usr/bin/env bash

go build
./cozy-stack serve &
sleep 5
./cozy-stack instances add --dev --passphrase <PASSWORD> localhost:8080

export CLIENT_ID=$(./cozy-stack instances client-oauth localhost:8080 http://localhost/ test github.com/cozy/cozy-stack/integration)
export TEST_TOKEN=$(./cozy-stack instances token-oauth localhost:8080 $CLIENT_ID io.cozy.pouchtestobject)

cd tests/pouchdb-integration
npm install && npm run test
testresult=$?
cd ../..

./scripts/build.sh assets
assetsresult=$?

pidstack=$(jobs -pr)
[ -n "$pidstack" ] && kill -9 "$pidstack"

if git grep -l -e 'github.com/labstack/gommon/log' -e 'github.com/dgrijalva/jwt-go' -- '*.go'; then
  exit 1
fi

[ $testresult -gt 0 ] && exit $testresult
[ $assetsresult -gt 0 ] && exit $assetsresult
{'fraction_non_alphanumeric': 0.15165562913907285, 'fraction_numerical': 0.02119205298013245, 'mean_word_length': 4.122033898305085, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '1513435', 'n_tokens_mistral': 571, 'n_tokens_neox': 520, 'n_words': 140}