This repository has been archived by the owner on Oct 14, 2022. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bumped to PHP 7.4, dropped Travis in favour of Github Actions
- Loading branch information
1 parent
bb4def0
commit 7a09a9b
Showing
17 changed files
with
1,762 additions
and
2,748 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
github: WyriHaximus |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: Continuous Integration | ||
on: | ||
push: | ||
pull_request: | ||
jobs: | ||
composer-install: | ||
strategy: | ||
matrix: | ||
php: [7.4] | ||
composer: [lowest, current, highest] | ||
runs-on: ubuntu-latest | ||
container: | ||
image: wyrihaximusnet/php:${{ matrix.php }}-zts-alpine3.11-dev-root | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Cache composer packages | ||
uses: actions/cache@v1 | ||
with: | ||
path: ./vendor/ | ||
key: ${{ matrix.composer }}-${{ matrix.php }}-${{ hashFiles('**/composer.lock') }} | ||
- name: Install Dependencies | ||
run: composer update --prefer-lowest --no-progress --ansi --no-interaction --prefer-dist | ||
if: matrix.composer == 'lowest' | ||
- name: Install Dependencies | ||
run: composer install --ansi --no-progress --no-interaction --prefer-dist | ||
if: matrix.composer == 'current' | ||
- name: Install Dependencies | ||
run: composer update --ansi --no-progress --no-interaction --prefer-dist | ||
if: matrix.composer == 'highest' | ||
qa: | ||
strategy: | ||
matrix: | ||
php: [7.4] | ||
composer: [lowest, current, highest] | ||
qa: [lint, cs, stan, psalm, unit-ci, infection, composer-require-checker, composer-unused] | ||
needs: composer-install | ||
runs-on: ubuntu-latest | ||
container: | ||
image: wyrihaximusnet/php:${{ matrix.php }}-zts-alpine3.11-dev-root | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Cache composer packages | ||
uses: actions/cache@v1 | ||
with: | ||
path: ./vendor/ | ||
key: ${{ matrix.composer }}-${{ matrix.php }}-${{ hashFiles('**/composer.lock') }} | ||
- run: make ${{ matrix.qa }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,68 +1,9 @@ | ||
filter: | ||
paths: [src/*] | ||
excluded_paths: [examples/*, tests/*] | ||
tools: | ||
external_code_coverage: true | ||
php_analyzer: true | ||
php_hhvm: true | ||
php_sim: true | ||
php_pdepend: true | ||
sensiolabs_security_checker: true | ||
php_changetracking: true | ||
php_code_sniffer: | ||
enabled: true | ||
config: | ||
tab_width: 0 | ||
encoding: utf8 | ||
ruleset: ~ | ||
standard: "PSR2" | ||
php_cs_fixer: | ||
enabled: true | ||
config: | ||
level: psr2 | ||
php_mess_detector: | ||
enabled: true | ||
config: | ||
ruleset: ~ | ||
code_size_rules: | ||
cyclomatic_complexity: true | ||
npath_complexity: true | ||
excessive_method_length: true | ||
excessive_class_length: true | ||
excessive_parameter_list: true | ||
excessive_public_count: true | ||
too_many_fields: true | ||
too_many_methods: true | ||
excessive_class_complexity: true | ||
design_rules: | ||
exit_expression: true | ||
eval_expression: true | ||
goto_statement: true | ||
number_of_class_children: true | ||
depth_of_inheritance: true | ||
coupling_between_objects: true | ||
unused_code_rules: | ||
unused_private_field: true | ||
unused_local_variable: true | ||
unused_private_method: true | ||
unused_formal_parameter: true | ||
naming_rules: | ||
short_variable: | ||
minimum: 3 | ||
long_variable: | ||
maximum: 20 | ||
short_method: | ||
minimum: 3 | ||
constructor_conflict: true | ||
constant_naming: true | ||
boolean_method_name: true | ||
controversial_rules: | ||
superglobals: true | ||
camel_case_class_name: true | ||
camel_case_property_name: true | ||
camel_case_method_name: true | ||
camel_case_parameter_name: true | ||
camel_case_variable_name: true | ||
checks: | ||
php: | ||
code_rating: true | ||
excluded_paths: [tests/*] | ||
build: | ||
nodes: | ||
analysis: | ||
tests: | ||
override: | ||
- php-scrutinizer-run --enable-security-analysis |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,45 @@ | ||
all: | ||
composer run-script qa-all --timeout=0 | ||
# set all to phony | ||
SHELL=bash | ||
|
||
all-coverage: | ||
composer run-script qa-all-coverage --timeout=0 | ||
.PHONY: * | ||
|
||
ci: | ||
composer run-script qa-ci --timeout=0 | ||
ifneq ("$(wildcard /.dockerenv)","") | ||
DOCKER_RUN= | ||
else | ||
DOCKER_RUN=docker run --rm -it \ | ||
-v `pwd`:`pwd` \ | ||
-w `pwd` \ | ||
"wyrihaximusnet/php:7.4-zts-alpine3.11-dev" | ||
endif | ||
|
||
ci-extended: | ||
composer run-script qa-ci-extended --timeout=0 | ||
all: lint cs-fix cs stan psalm unit infection composer-require-checker composer-unused | ||
|
||
contrib: | ||
composer run-script qa-contrib --timeout=0 | ||
|
||
init: | ||
composer ensure-installed | ||
lint: | ||
$(DOCKER_RUN) vendor/bin/parallel-lint --exclude vendor . | ||
|
||
cs: | ||
composer cs | ||
$(DOCKER_RUN) vendor/bin/phpcs --parallel=$(nproc) | ||
|
||
cs-fix: | ||
composer cs-fix | ||
$(DOCKER_RUN) vendor/bin/phpcbf --parallel=$(nproc) | ||
|
||
stan: | ||
$(DOCKER_RUN) vendor/bin/phpstan analyse src tests --level max --ansi -c phpstan.neon | ||
|
||
psalm: | ||
$(DOCKER_RUN) vendor/bin/psalm --threads=$(nproc) --shepherd --stats | ||
|
||
unit: | ||
composer run-script unit --timeout=0 | ||
$(DOCKER_RUN) vendor/bin/phpunit --colors=always -c phpunit.xml.dist --coverage-text --coverage-html covHtml --coverage-clover ./build/logs/clover.xml | ||
|
||
unit-ci: unit | ||
if [ -f ./build/logs/clover.xml ]; then wget https://scrutinizer-ci.com/ocular.phar && sleep 3 && php ocular.phar code-coverage:upload --format=php-clover ./build/logs/clover.xml; fi | ||
|
||
infection: | ||
$(DOCKER_RUN) vendor/bin/infection --ansi --min-msi=100 --min-covered-msi=100 --threads=$(nproc) | ||
|
||
unit-coverage: | ||
composer run-script unit-coverage --timeout=0 | ||
composer-require-checker: | ||
$(DOCKER_RUN) vendor/bin/composer-require-checker --ignore-parse-errors --ansi -vvv --config-file=composer-require-checker.json | ||
|
||
ci-coverage: init | ||
composer ci-coverage | ||
composer-unused: | ||
$(DOCKER_RUN) composer unused --ansi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"symbol-whitelist" : [ | ||
"null", "true", "false", | ||
"static", "self", "parent", | ||
"array", "string", "int", "float", "bool", "iterable", "callable", "void", "object", | ||
"Safe\\ksort" | ||
], | ||
"php-core-extensions" : [ | ||
"Core", | ||
"date", | ||
"pcre", | ||
"Phar", | ||
"Reflection", | ||
"SPL", | ||
"standard" | ||
], | ||
"scan-files" : [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.