Skip to content

Commit 19e7670

Browse files
authored
Merge pull request #9 from JMLamodiere/fail_on_lint_error
fail CI on failure of any static or dynamic test
2 parents 3d5efa5 + f94a24e commit 19e7670

File tree

3 files changed

+20
-12
lines changed

3 files changed

+20
-12
lines changed

.php_cs.dist

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ return (new PhpCsFixer\Config())
2121
'no_unreachable_default_argument_value' => true,
2222
'no_useless_else' => true,
2323
'no_useless_return' => true,
24-
'php_unit_strict' => true,
2524
'phpdoc_order' => true,
2625
'strict_comparison' => true,
2726
'strict_param' => true,

Makefile

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -47,22 +47,31 @@ preinstall: ## Pre-install steps
4747
install: ## Install steps
4848
docker-compose run php composer install
4949

50-
test:lint ## Run all tests
51-
test:phpunit
52-
test:behat
50+
test:test-static ## Run all tests (static + dynamic)
51+
test:test-dynamic
5352

54-
lint: ## Run all linters
55-
# Checks coding standards. Fixable with "make fix-style"
53+
test-static:php-cs-fixer ## Run static tests
54+
test-static:lint-yaml
55+
test-static:lint-container
56+
test-static:composer-validate
57+
58+
test-dynamic:phpunit ## Run dynamic tests
59+
test-dynamic:behat
60+
61+
php-cs-fixer: ## [static] Checks coding standards. Fixable with "make fix-style"
5662
docker-compose run php ./vendor/bin/php-cs-fixer --config=.php_cs.dist fix --diff --dry-run -v
57-
# checks that the YAML config files contain no syntax errors
63+
64+
lint-yaml: ## [static] Checks that the YAML config files contain no syntax errors
5865
docker-compose run php ./bin/console lint:yaml config --parse-tags
59-
# checks that arguments injected into services match type declarations.
66+
67+
lint-container: ## [static] Checks that arguments injected into services match type declarations.
6068
docker-compose run php ./bin/console lint:container
61-
# checks that the composer.json and composer.lock files are valid
69+
70+
composer-validate: ## [static] Checks that the composer.json and composer.lock files are valid
6271
docker-compose run php composer validate --strict
6372

64-
phpunit: ## Run phpunit
73+
phpunit: ## [dynamic] Run phpunit
6574
docker-compose run php vendor/bin/phpunit
6675

67-
behat: ## Run behat
76+
behat: ## [dynamic] Run behat
6877
docker-compose run php vendor/bin/behat

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[![Build Status](https://travis-ci.com/JMLamodiere/tdd-demo-forumphp2020.svg?branch=main)](https://travis-ci.com/JMLamodiere/tdd-demo-forumphp2020)
44

5-
Forum PHP 2020 talk (in French) : [Trop de mock tue le test : ce que l'archi hexagonale a changé](https://event.afup.org/forum-php-2020/programme-forum-php-2020/#3414)
5+
Live coding examples used during Forum PHP 2020 talk (in :fr: French) : [Trop de mock tue le test : ce que l'archi hexagonale a changé](https://event.afup.org/forum-php-2020/programme-forum-php-2020/#3414)
66

77
:warning: **WARNING:** The [bad_implementation](https://github.com/JMLamodiere/tdd-demo-forumphp2020/tree/bad_implementation)
88
branch contains example of bad practices ! See [main](https://github.com/JMLamodiere/tdd-demo-forumphp2020) branch

0 commit comments

Comments
 (0)