<commit_before>.PHONY: asset composer coverage cs database infection integration it test unit

it: cs test

asset:
	yarn install
	yarn run production

composer:
	composer install

coverage: composer
	vendor/bin/phpunit --testsuite unit --coverage-text

cs: composer
	vendor/bin/php-cs-fixer fix --verbose --diff

database: composer
	mysql -uroot -e "DROP DATABASE IF EXISTS cfp_test"
	mysql -uroot -e "CREATE DATABASE cfp_test"
	if [ ! -f "phinx.yml" ]; then cp phinx.yml.dist phinx.yml; fi
	vendor/bin/phinx migrate -e testing
	mysqldump -uroot cfp_test > tests/dump.sql

infection: composer database
	vendor/bin/infection

integration: composer database
	if [ ! -f "config/testing.yml" ]; then cp config/testing.dist.yml config/testing.yml; fi
	vendor/bin/phpunit --testsuite integration

test: integration unit

unit: composer
	vendor/bin/phpunit --testsuite unit<commit_msg>Makefile should use CFP_ENV=testing instead of `-e testing`<commit_after>.PHONY: asset composer coverage cs database infection integration it test unit

it: cs test

asset:
	yarn install
	yarn run production

composer:
	composer install

coverage: composer
	vendor/bin/phpunit --testsuite unit --coverage-text

cs: composer
	vendor/bin/php-cs-fixer fix --verbose --diff

database: composer
	mysql -uroot -e "DROP DATABASE IF EXISTS cfp_test"
	mysql -uroot -e "CREATE DATABASE cfp_test"
	CFP_ENV=testing vendor/bin/phinx migrate
	mysqldump -uroot cfp_test > tests/dump.sql

infection: composer database
	vendor/bin/infection

integration: composer database
	if [ ! -f "config/testing.yml" ]; then cp config/testing.dist.yml config/testing.yml; fi
	vendor/bin/phpunit --testsuite integration

test: integration unit

unit: composer
	vendor/bin/phpunit --testsuite unit
{'fraction_non_alphanumeric': 0.08944954128440367, 'fraction_numerical': 0.0, 'mean_word_length': 4.224550898203593, 'pattern_counts': {'":': 0, '<': 3, '<?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': '1703210', 'n_tokens_mistral': 589, 'n_tokens_neox': 565, 'n_words': 183}