File tree Expand file tree Collapse file tree 5 files changed +58
-22
lines changed Expand file tree Collapse file tree 5 files changed +58
-22
lines changed Original file line number Diff line number Diff line change 1
- /templates export-ignore
2
- /tests export-ignore
3
- /.gitattributes export-ignore
4
- /.gitignore export-ignore
5
- /.scrutinizer.yml export-ignore
6
- /.travis.yml export-ignore
7
- /infection.json.dist export-ignore
8
- /phpcs.xml.dist export-ignore
9
- /phpstan.neon.dist export-ignore
10
- /phpunit.xml.dist export-ignore
11
- /README.md export-ignore
1
+ /.github export-ignore
2
+ /templates export-ignore
3
+ /tests export-ignore
4
+ /.gitattributes export-ignore
5
+ /.gitignore export-ignore
6
+ /. * .yml export-ignore
7
+ /* .dist export-ignore
8
+ /Makefile export-ignore
9
+ /README.md export-ignore
Original file line number Diff line number Diff line change 1
1
/vendor /
2
2
/composer.lock
3
3
/.phpcs.cache
4
- /infection-log.txt
4
+ /infection.log
5
5
/.phpunit.result.cache
Original file line number Diff line number Diff line change 1
- dist : trusty
2
- sudo : false
1
+ os : linux
2
+ dist : bionic
3
3
language : php
4
4
5
5
php :
@@ -12,12 +12,17 @@ cache:
12
12
13
13
before_install :
14
14
- mv ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini{,.disabled} || echo "xdebug not available"
15
- - composer self-update
16
15
17
- install : travis_retry composer install
16
+ install :
17
+ - |
18
+ if [ $TRAVIS_PHP_VERSION = 'nightly' ]; then
19
+ travis_retry travis_retry make vendor EXTRA_FLAGS="--ignore-platform-reqs";
20
+ else
21
+ travis_retry travis_retry make vendor;
22
+ fi
18
23
19
24
script :
20
- - ./vendor/bin/phpunit
25
+ - make unit-test
21
26
22
27
jobs :
23
28
allow_failures :
@@ -30,25 +35,25 @@ jobs:
30
35
- mv ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini{.disabled,}
31
36
- if [[ ! $(php -m | grep -si xdebug) ]]; then echo "xdebug required for coverage"; exit 1; fi
32
37
script :
33
- - ./vendor/bin/phpunit -- coverage-clover ./clover.xml
38
+ - make unit-test EXTRA_FLAGS="-- coverage-clover ./clover.xml"
34
39
after_script :
35
40
- wget https://scrutinizer-ci.com/ocular.phar
36
41
- php ocular.phar code-coverage:upload --format=php-clover ./clover.xml
37
42
38
43
- stage : Code Quality
39
44
env : CODE_STANDARD=1
40
45
script :
41
- - ./vendor/bin/phpcs
46
+ - make coding-standard
42
47
43
48
- stage : Code Quality
44
49
env : STATIC_ANALYSIS=1
45
50
script :
46
- - ./vendor/bin/phpstan analyse
51
+ - make static-analysis
47
52
48
53
- stage : Code Quality
49
54
env : MUTATION_TESTS=1
50
55
before_script :
51
56
- mv ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini{.disabled,}
52
57
- if [[ ! $(php -m | grep -si xdebug) ]]; then echo "xdebug required for mutation tests"; exit 1; fi
53
58
script :
54
- - ./vendor/bin/infection --threads=$(nproc) --min-msi=100 --min-covered-msi=100
59
+ - make mutation-test
Original file line number Diff line number Diff line change
1
+ MIN_MSI =100
2
+ MIN_COVERED_MSI =100
3
+
4
+ ifeq ("${CI}", "true")
5
+ PARALLELISM=4
6
+ else
7
+ PARALLELISM=$(shell nproc)
8
+ endif
9
+
10
+ .PHONY : valid test coding-standard-fix coding-standard static-analysis unit-test mutation-test
11
+
12
+ valid : coding-standard-fix coding-standard static-analysis test
13
+
14
+ test : unit-test mutation-test
15
+
16
+ vendor : composer.json
17
+ composer install $(EXTRA_FLAGS )
18
+ @touch -c vendor
19
+
20
+ coding-standard : vendor
21
+ vendor/bin/phpcs --parallel=$(PARALLELISM )
22
+
23
+ coding-standard-fix : vendor
24
+ vendor/bin/phpcbf --parallel=$(PARALLELISM ) || true
25
+
26
+ static-analysis : vendor
27
+ vendor/bin/phpstan analyse $(EXTRA_FLAGS )
28
+
29
+ unit-test : vendor
30
+ vendor/bin/phpunit --testsuite unit --stop-on-error --stop-on-failure $(EXTRA_FLAGS )
31
+
32
+ mutation-test : vendor
33
+ vendor/bin/infection --no-progress -j=$(PARALLELISM ) -s --min-msi=$(MIN_MSI ) --min-covered-msi=$(MIN_COVERED_MSI ) $(EXTRA_FLAGS )
Original file line number Diff line number Diff line change 4
4
"directories": ["src"]
5
5
},
6
6
"logs": {
7
- "text": "infection-log.txt "
7
+ "text": "infection.log "
8
8
}
9
9
}
You can’t perform that action at this time.
0 commit comments