Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to infection/abstract-codeception-adapter 0.5.0 #8

Merged
merged 8 commits into from Sep 6, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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.
19 changes: 12 additions & 7 deletions Makefile
Expand Up @@ -28,16 +28,17 @@ PSALM_ARGS=--show-info=false
COMPOSER=$(PHP) $(shell which composer)

# Infection
INFECTION=vendor/bin/infection
MIN_MSI=52.212389380531
MIN_COVERED_MSI=95
INFECTION=./.tools/infection.phar
INFECTION_URL="https://github.com/infection/infection/releases/download/0.24.0/infection.phar"
MIN_MSI=78
MIN_COVERED_MSI=98
INFECTION_ARGS=--min-msi=$(MIN_MSI) --min-covered-msi=$(MIN_COVERED_MSI) --threads=$(JOBS) --log-verbosity=none --no-interaction --no-progress

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