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

Commit 476d91c

Browse files
committed
Update build
1 parent b0a8756 commit 476d91c

File tree

5 files changed

+53
-41
lines changed

5 files changed

+53
-41
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: 11 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -23,24 +23,25 @@
2323
"require": {
2424
"php": ">= 7.1",
2525
"apitte/core": "^0.5.0",
26-
"tracy/tracy": "~2.4.14 || ~2.5.0 || ~2.6.0",
27-
"nette/di": "~2.4.12",
28-
"nette/utils": "~2.5.3"
26+
"nette/utils": "~2.5.3",
27+
"tracy/tracy": "~2.4.14 || ~2.5.0 || ~2.6.0"
2928
},
3029
"suggest": {
3130
"symfony/yaml": "Allows yaml definition"
3231
},
3332
"require-dev": {
34-
"ninjify/qa": "^0.8.0",
33+
"nette/di": "~2.4.12",
3534
"ninjify/nunjuck": "^0.2.0",
36-
"symfony/yaml": "^4.2",
37-
"phpstan/phpstan-shim": "^0.11",
35+
"ninjify/qa": "^0.8.0",
3836
"phpstan/phpstan-deprecation-rules": "^0.11",
3937
"phpstan/phpstan-nette": "^0.11",
40-
"phpstan/phpstan-strict-rules": "^0.11"
38+
"phpstan/phpstan-shim": "^0.11",
39+
"phpstan/phpstan-strict-rules": "^0.11",
40+
"symfony/yaml": "^4.2"
4141
},
4242
"conflict": {
43-
"nette/utils": "<2.5.2"
43+
"nette/di": "<2.4.12",
44+
"symfony/yaml": "<4.2.0"
4445
},
4546
"autoload": {
4647
"psr-4": {
@@ -49,20 +50,8 @@
4950
},
5051
"minimum-stability": "dev",
5152
"prefer-stable": true,
52-
"scripts": {
53-
"qa": [
54-
"linter src tests",
55-
"codesniffer src tests"
56-
],
57-
"tests": [
58-
"tester -s -p php --colors 1 -C tests/cases"
59-
],
60-
"coverage": [
61-
"tester -s -p phpdbg --colors 1 -C --coverage ./coverage.xml --coverage-src ./src tests/cases"
62-
],
63-
"phpstan": [
64-
"vendor/bin/phpstan analyse -l max -c phpstan.neon src"
65-
]
53+
"config": {
54+
"sort-packages": true
6655
},
6756
"extra": {
6857
"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
<!-- Schema is not implemented completely -->

0 commit comments

Comments
 (0)