mirror of
https://github.com/erusev/parsedown.git
synced 2023-08-10 21:13:06 +03:00
Add mutation testing
This commit is contained in:
parent
54f2c4eb4c
commit
efe324c08b
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,2 +1,3 @@
|
||||
composer.lock
|
||||
vendor/
|
||||
infection.log
|
||||
|
67
.travis.yml
67
.travis.yml
@ -5,31 +5,15 @@ sudo: false
|
||||
|
||||
stages:
|
||||
- Code Format and Static Analysis
|
||||
- test
|
||||
- Units
|
||||
- Mutation
|
||||
- Test CommonMark (weak)
|
||||
|
||||
php:
|
||||
- 5.5
|
||||
- 5.6
|
||||
- 7.0
|
||||
- 7.1
|
||||
- 7.2
|
||||
- 7.3
|
||||
- nightly
|
||||
|
||||
matrix:
|
||||
fast_finish: true
|
||||
allow_failures:
|
||||
- php: nightly
|
||||
- env: ALLOW_FAILURE
|
||||
|
||||
install:
|
||||
# remove packages with PHP requirements higher than 7.0 to prevent composer trying to resolve these, see: https://github.com/composer/composer/issues/6011
|
||||
- composer remove vimeo/psalm friendsofphp/php-cs-fixer --dev --no-update --no-interaction
|
||||
- composer install --prefer-dist --no-interaction --no-progress
|
||||
|
||||
script: composer test-units
|
||||
|
||||
cache:
|
||||
directories:
|
||||
- $HOME/.composer/cache
|
||||
@ -45,7 +29,47 @@ jobs:
|
||||
- composer test-formatting
|
||||
- composer test-dead-code
|
||||
|
||||
- stage: Test CommonMark
|
||||
|
||||
- &UNIT_TEST
|
||||
stage: Units
|
||||
php: 5.5
|
||||
install:
|
||||
# remove packages with PHP requirements higher than 7.0 to prevent composer trying to resolve these, see: https://github.com/composer/composer/issues/6011
|
||||
- composer remove vimeo/psalm friendsofphp/php-cs-fixer infection/infection --dev --no-update --no-interaction
|
||||
- composer install --prefer-dist --no-interaction --no-progress
|
||||
script: composer test-units
|
||||
- <<: *UNIT_TEST
|
||||
php: 5.6
|
||||
- <<: *UNIT_TEST
|
||||
php: 7.0
|
||||
- <<: *UNIT_TEST
|
||||
php: 7.1
|
||||
- <<: *UNIT_TEST
|
||||
php: 7.2
|
||||
- <<: *UNIT_TEST
|
||||
php: 7.3
|
||||
- <<: *UNIT_TEST
|
||||
php: nightly
|
||||
env: ALLOW_FAILURE
|
||||
|
||||
|
||||
- &MUTATION_TEST
|
||||
stage: Mutation
|
||||
php: 7.1
|
||||
install:
|
||||
- composer install --prefer-dist --no-interaction --no-progress
|
||||
script: vendor/bin/infection --threads=2 --min-msi=80 --min-covered-msi=80
|
||||
- <<: *MUTATION_TEST
|
||||
php: 7.2
|
||||
- <<: *MUTATION_TEST
|
||||
php: 7.3
|
||||
- <<: *MUTATION_TEST
|
||||
php: nightly
|
||||
env: ALLOW_FAILURE
|
||||
|
||||
|
||||
- &COMMONMARK_TEST
|
||||
stage: CommonMark
|
||||
name: Weak
|
||||
php: 7.3
|
||||
env: ALLOW_FAILURE
|
||||
@ -53,10 +77,7 @@ jobs:
|
||||
script:
|
||||
- composer test-commonmark-weak
|
||||
|
||||
- stage: Test CommonMark
|
||||
- <<: *COMMONMARK_TEST
|
||||
name: Strict
|
||||
php: 7.3
|
||||
env: ALLOW_FAILURE
|
||||
install: composer install --prefer-dist --no-interaction --no-progress
|
||||
script:
|
||||
- composer test-commonmark
|
||||
|
@ -19,7 +19,8 @@
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^7.4|^6.5.13|^5.7.27|^4.8.36",
|
||||
"vimeo/psalm": "^3.0.11",
|
||||
"friendsofphp/php-cs-fixer": "^2.13"
|
||||
"friendsofphp/php-cs-fixer": "^2.13",
|
||||
"infection/infection": "^0.12.0"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {"Erusev\\Parsedown\\": "src/"}
|
||||
|
14
infection.json.dist
Normal file
14
infection.json.dist
Normal file
@ -0,0 +1,14 @@
|
||||
{
|
||||
"timeout": 10,
|
||||
"source": {
|
||||
"directories": [
|
||||
"src"
|
||||
]
|
||||
},
|
||||
"logs": {
|
||||
"text": "infection.log"
|
||||
},
|
||||
"mutators": {
|
||||
"@default": true
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user