Skip to content

Commit c3e2d60

Browse files
committed
Update build
1 parent c605d6e commit c3e2d60

File tree

5 files changed

+51
-36
lines changed

5 files changed

+51
-36
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ tests export-ignore
55
.gitattributes export-ignore
66
.gitignore export-ignore
77
.travis.yml export-ignore
8+
Makefile export-ignore
89
phpstan.neon export-ignore
910
README.md export-ignore
1011
ruleset.xml export-ignore

.travis.yml

Lines changed: 13 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,47 +3,40 @@ php:
33
- 7.1
44
- 7.2
55
- 7.3
6+
- 7.4snapshot
7+
- nightly
68

79
before_install:
8-
# Turn off XDebug
9-
- phpenv config-rm xdebug.ini || return 0
10+
- phpenv config-rm xdebug.ini || return 0 # Turn off XDebug
1011

1112
install:
12-
# Composer
13-
- travis_retry composer install --no-progress --prefer-dist
13+
- travis_retry composer install --no-progress --prefer-dist # Install dependencies
1414

1515
script:
16-
# Tests
17-
- composer run-script tests
16+
- make tests # Tests
1817

1918
after_failure:
20-
# Print *.actual content
21-
- for i in $(find tests -name \*.actual); do echo "--- $i"; cat $i; echo; echo; done
19+
- for i in $(find tests -name \*.actual); do echo "--- $i"; cat $i; echo; echo; done # Print *.actual content
2220

2321
jobs:
2422
include:
2523
- env: title="Lowest Dependencies 7.1"
2624
php: 7.1
2725
install:
28-
- travis_retry composer update --no-progress --prefer-dist --prefer-lowest
26+
- travis_retry composer update --no-progress --prefer-dist --prefer-lowest --prefer-stable
2927
script:
30-
- composer run-script tests
28+
- make tests
3129

3230
- stage: Quality Assurance
3331
php: 7.1
3432
script:
35-
- composer run-script qa
36-
37-
- stage: Phpstan
38-
php: 7.1
39-
script:
40-
- composer run-script phpstan
33+
- make qa
4134

4235
- stage: Test Coverage
4336
if: branch = master AND type = push
4437
php: 7.1
4538
script:
46-
- composer run-script coverage
39+
- make coverage
4740
after_script:
4841
- composer global require php-coveralls/php-coveralls ^2.1.0
4942
- ~/.composer/vendor/bin/php-coveralls --verbose --config tests/.coveralls.yml
@@ -52,10 +45,12 @@ jobs:
5245
if: branch = master AND type = cron
5346
php: 7.1
5447
script:
55-
- composer outdated --direct --strict
48+
- composer outdated --direct
5649

5750
allow_failures:
5851
- stage: Test Coverage
52+
- php: 7.4snapshot
53+
- php: nightly
5954

6055
sudo: false
6156

Makefile

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
.PHONY: qa lint cs csf phpstan tests coverage
2+
3+
all:
4+
@$(MAKE) -pRrq -f $(lastword $(MAKEFILE_LIST)) : 2>/dev/null | awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | sort | egrep -v -e '^[^[:alnum:]]' -e '^$@$$' | xargs
5+
6+
vendor: composer.json composer.lock
7+
composer install
8+
9+
qa: lint phpstan cs
10+
11+
lint: vendor
12+
vendor/bin/linter src tests
13+
14+
cs: vendor
15+
vendor/bin/codesniffer src tests
16+
17+
csf: vendor
18+
vendor/bin/codefixer src tests
19+
20+
phpstan: vendor
21+
vendor/bin/phpstan analyse -l max -c phpstan.neon src
22+
23+
tests: vendor
24+
vendor/bin/tester -s -p php --colors 1 -C tests/cases
25+
26+
coverage: vendor
27+
vendor/bin/tester -s -p phpdbg --colors 1 -C --coverage ./coverage.xml --coverage-src ./src tests/cases

composer.json

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -15,36 +15,28 @@
1515
"symfony/console": "^4.1.1"
1616
},
1717
"require-dev": {
18-
"ninjify/qa": "^0.8.0",
19-
"ninjify/nunjuck": "^0.2.0",
2018
"apitte/negotiation": "^0.5.0",
2119
"nette/di": "~2.4.15",
22-
"phpstan/phpstan-shim": "^0.11",
20+
"ninjify/nunjuck": "^0.2.0",
21+
"ninjify/qa": "^0.8.0",
2322
"phpstan/phpstan-deprecation-rules": "^0.11",
2423
"phpstan/phpstan-nette": "^0.11",
24+
"phpstan/phpstan-shim": "^0.11",
2525
"phpstan/phpstan-strict-rules": "^0.11"
2626
},
27+
"conflict": {
28+
"apitte/negotiation": "<0.5.0",
29+
"nette/di": "<2.4.15"
30+
},
2731
"autoload": {
2832
"psr-4": {
2933
"Apitte\\Console\\": "src"
3034
}
3135
},
3236
"minimum-stability": "dev",
3337
"prefer-stable": true,
34-
"scripts": {
35-
"qa": [
36-
"linter src tests",
37-
"codesniffer src tests"
38-
],
39-
"tests": [
40-
"tester -s -p php --colors 1 -C tests/cases"
41-
],
42-
"coverage": [
43-
"tester -s -p phpdbg --colors 1 -C --coverage ./coverage.xml --coverage-src ./src tests/cases"
44-
],
45-
"phpstan": [
46-
"vendor/bin/phpstan analyse -l max -c phpstan.neon src"
47-
]
38+
"config": {
39+
"sort-packages": true
4840
},
4941
"extra": {
5042
"branch-alias": {

ruleset.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0"?>
2-
<ruleset name="Contributte">
2+
<ruleset>
33
<!-- Contributte Coding Standard -->
44
<rule ref="./vendor/ninjify/coding-standard/contributte.xml">
55
<exclude name="Squiz.Commenting.FunctionComment.InvalidTypeHint"/>

0 commit comments

Comments
 (0)