Skip to content
This repository was archived by the owner on Dec 9, 2025. It is now read-only.

Commit 56fcd1b

Browse files
committed
Update build
1 parent e1750bd commit 56fcd1b

5 files changed

Lines changed: 51 additions & 41 deletions

File tree

.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 & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -22,41 +22,28 @@
2222
"tracy/tracy": "~2.4.14 || ~2.5.0 || ~2.6.0"
2323
},
2424
"require-dev": {
25-
"ninjify/qa": "^0.8.0",
26-
"ninjify/nunjuck": "^0.2.0",
2725
"apitte/negotiation": "^0.5.0",
2826
"nette/di": "~2.4.12",
29-
"phpstan/phpstan-shim": "^0.11",
27+
"ninjify/nunjuck": "^0.2.0",
28+
"ninjify/qa": "^0.8.0",
3029
"phpstan/phpstan-deprecation-rules": "^0.11",
3130
"phpstan/phpstan-nette": "^0.11",
31+
"phpstan/phpstan-shim": "^0.11",
3232
"phpstan/phpstan-strict-rules": "^0.11"
3333
},
34+
"conflict": {
35+
"apitte/negotiation": "<0.5.0",
36+
"nette/di": "<2.4.12"
37+
},
3438
"autoload": {
3539
"psr-4": {
3640
"Apitte\\Debug\\": "src"
3741
}
3842
},
39-
"autoload-dev": {
40-
"psr-4": {
41-
"Tests\\Fixtures\\": "tests/fixtures"
42-
}
43-
},
4443
"minimum-stability": "dev",
4544
"prefer-stable": true,
46-
"scripts": {
47-
"qa": [
48-
"linter src tests",
49-
"codesniffer src tests"
50-
],
51-
"tests": [
52-
"tester -s -p php --colors 1 -C tests/cases"
53-
],
54-
"coverage": [
55-
"tester -s -p phpdbg --colors 1 -C --coverage ./coverage.xml --coverage-src ./src tests/cases"
56-
],
57-
"phpstan": [
58-
"vendor/bin/phpstan analyse -l max -c phpstan.neon src"
59-
]
45+
"config": {
46+
"sort-packages": true
6047
},
6148
"extra": {
6249
"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)