<commit_before>#!/bin/bash
echo "Setting up"
WORKINGDIR=$PWD
cp ../halite.ini temp.ini
cp tests.ini ../halite.ini
python3 setupMysql.py || python setupMysql.py

echo "Website tests"
phpunit --stderr website/

echo "Environment tests"
cd environment
python3 testenv.py

function finish {
	echo "Cleaning up"
	cd $WORKINGDIR
	cp temp.ini ../halite.ini
}
trap finish EXIT<commit_msg>Tests exit on first fail<commit_after>#!/bin/bash

set -e
function finish {
	echo "Cleaning up"
	cd $WORKINGDIR
	cp temp.ini ../halite.ini
}
trap finish EXIT

echo "Setting up"
WORKINGDIR=$PWD
cp ../halite.ini temp.ini
cp tests.ini ../halite.ini
python3 setupMysql.py || python setupMysql.py

echo "Website tests"
phpunit --stderr website/

echo "Environment tests"
cd environment
python3 testenv.py
{'fraction_non_alphanumeric': 0.1116816431322208, 'fraction_numerical': 0.005134788189987163, 'mean_word_length': 4.098039215686274, 'pattern_counts': {'":': 0, '<': 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': '1257430', 'n_tokens_mistral': 288, 'n_tokens_neox': 275, 'n_words': 87}