Skip to content

Commit

Permalink
Merge 376d7c2 into 5ccf421
Browse files Browse the repository at this point in the history
  • Loading branch information
maks-rafalko committed Sep 6, 2021
2 parents 5ccf421 + 376d7c2 commit c2e8052
Show file tree
Hide file tree
Showing 10 changed files with 42 additions and 533 deletions.
2 changes: 2 additions & 0 deletions .gitignore
@@ -1,7 +1,9 @@
!/.tools/.gitkeep
.phpunit.result.cache
/.composer/
/.idea
/.php_cs.cache
/.tools/
/build/
/infection.log
/vendor/
Empty file added .tools/.gitkeep
Empty file.
15 changes: 10 additions & 5 deletions Makefile
Expand Up @@ -28,7 +28,8 @@ PSALM_ARGS=--show-info=false
COMPOSER=$(PHP) $(shell which composer)

# Infection
INFECTION=vendor/bin/infection
INFECTION=./.tools/infection.phar
INFECTION_URL="https://github.com/infection/infection/releases/download/0.24.0/infection.phar"
MIN_MSI=52.212389380531
MIN_COVERED_MSI=95
INFECTION_ARGS=--min-msi=$(MIN_MSI) --min-covered-msi=$(MIN_COVERED_MSI) --threads=$(JOBS) --log-verbosity=none --no-interaction --no-progress
Expand All @@ -37,7 +38,7 @@ all: test

cs:
$(PHP_CS_FIXER) fix $(PHP_CS_FIXER_ARGS) --dry-run
LC_ALL=C sort -c -u .gitignore
LC_ALL=C sort -u .gitignore -o .gitignore

phpstan:
$(PHPSTAN) $(PHPSTAN_ARGS) --no-progress
Expand All @@ -50,10 +51,10 @@ static-analyze: phpstan psalm
test-unit:
$(PHPUNIT) $(PHPUNIT_ARGS)

test-e2e:
test-e2e: $(INFECTION)
tests/e2e_tests

infection:
infection: $(INFECTION)
$(INFECTION) $(INFECTION_ARGS)

##############################################################
Expand Down Expand Up @@ -92,7 +93,6 @@ prerequisites: build/cache vendor/autoload.php composer.lock infection.json.dist
# Do install if there's no 'vendor'
vendor/autoload.php:
$(COMPOSER) install --prefer-dist
test -d vendor/infection/infection/src/StreamWrapper/ && rm -fr vendor/infection/infection/src/StreamWrapper/ && $(COMPOSER) dump-autoload || true

# If composer.lock is older than `composer.json`, do update,
# and touch composer.lock because composer not always does that
Expand All @@ -101,3 +101,8 @@ composer.lock: composer.json

build/cache:
mkdir -p build/cache

$(INFECTION): Makefile
wget -q $(INFECTION_URL) --output-document=$(INFECTION)
chmod a+x $(INFECTION)
touch $@
3 changes: 1 addition & 2 deletions composer.json
Expand Up @@ -27,7 +27,7 @@
},
"require": {
"php": "^7.4 || ^8.0",
"infection/abstract-testframework-adapter": "^0.3.1",
"infection/abstract-testframework-adapter": "^0.5.0",
"infection/include-interceptor": "^0.2.0",
"symfony/filesystem": "^3.4.29 || ^4.0 || ^5.0",
"symfony/process": "^3.4.29 || ^4.0 || ^5.0",
Expand All @@ -40,7 +40,6 @@
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^2.18",
"infection/infection": "^0.21.0",
"php-coveralls/php-coveralls": "^2.4",
"phpstan/extension-installer": "^1.1",
"phpstan/phpstan": "^0.12.70",
Expand Down

0 comments on commit c2e8052

Please sign in to comment.