Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
221 changes: 191 additions & 30 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,196 @@
on: push
name: Qa workflow
jobs:
composer:
setup:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: composer
uses: docker://composer
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
args: install --no-interaction --prefer-dist --optimize-autoloader
- name: Code style check
uses: docker://phpdoc/phpcs-ga:master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
args: -d memory_limit=1024M -s
- name: composer-require-checker
uses: docker://phpga/composer-require-checker-ga
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
args: check --config-file ./composer-require-config.json composer.json
- name: Psalm
uses: docker://mickaelandrieu/psalm-ga
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: PHPStan
uses: docker://oskarstark/phpstan-ga
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
args: analyse src tests --level max --configuration phpstan.neon
- uses: actions/checkout@master
- name: Restore/cache vendor folder
uses: actions/cache@v1
with:
path: vendor
key: all-build-${{ hashFiles('**/composer.lock') }}
restore-keys: |
all-build-${{ hashFiles('**/composer.lock') }}
all-build-
- name: Restore/cache tools folder
uses: actions/cache@v1
with:
path: tools
key: all-tools-${{ github.sha }}
restore-keys: |
all-tools-${{ github.sha }}-
all-tools-
- name: composer
uses: docker://composer
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
args: install --no-interaction --prefer-dist --optimize-autoloader
- name: composer-require-checker
uses: docker://phpga/composer-require-checker-ga
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
args: check --config-file ./composer-require-config.json composer.json
- name: Install phive
run: make install-phive
- name: Install PHAR dependencies
run: tools/phive.phar --no-progress install --copy --trust-gpg-keys 4AA394086372C20A,D2CCAC42F6295E7D,E82B2FB314E9906E,8E730BA25823D8B5 --force-accept-unsigned

phpunit-with-coverage:
runs-on: ubuntu-latest
name: Unit tests
needs: setup
steps:
- uses: actions/checkout@master
- name: Restore/cache vendor folder
uses: actions/cache@v1
with:
path: vendor
key: all-build-${{ hashFiles('**/composer.lock') }}
restore-keys: |
all-build-${{ hashFiles('**/composer.lock') }}
all-build-
- name: Restore/cache tools folder
uses: actions/cache@v1
with:
path: tools
key: all-tools-${{ github.sha }}
restore-keys: |
all-tools-${{ github.sha }}-
all-tools-
- name: Setup PHP
uses: shivammathur/setup-php@master
with:
php-version: 7.2
extension-csv: mbstring, intl, iconv, libxml, dom, json, simplexml, zlib
ini-values-csv: memory_limit=2G, display_errors=On, error_reporting=-1
coverage: xdebug
pecl: false
- name: Run PHPUnit
run: php tools/phpunit

phpunit:
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system:
- ubuntu-latest
- windows-latest
- macOS-latest
php-versions: ['7.2', '7.3', '7.4']
name: Unit tests for PHP version ${{ matrix.php-versions }} on ${{ matrix.operating-system }}
needs:
- setup
- phpunit-with-coverage
steps:
- uses: actions/checkout@master
- name: Restore/cache vendor folder
uses: actions/cache@v1
with:
path: vendor
key: all-build-${{ hashFiles('**/composer.lock') }}
restore-keys: |
all-build-${{ hashFiles('**/composer.lock') }}
all-build-
- name: Restore/cache tools folder
uses: actions/cache@v1
with:
path: tools
key: all-tools-${{ github.sha }}
restore-keys: |
all-tools-${{ github.sha }}-
all-tools-
- name: Setup PHP
uses: shivammathur/setup-php@master
with:
php-version: ${{ matrix.php-versions }}
extension-csv: mbstring, intl, iconv, libxml, dom, json, simplexml, zlib
ini-values-csv: memory_limit=2G, display_errors=On, error_reporting=-1
pecl: false
- name: Run PHPUnit
continue-on-error: true
run: php tools/phpunit

codestyle:
runs-on: ubuntu-latest
needs: [setup, phpunit]
steps:
- uses: actions/checkout@master
- name: Restore/cache vendor folder
uses: actions/cache@v1
with:
path: vendor
key: all-build-${{ hashFiles('**/composer.lock') }}
restore-keys: |
all-build-${{ hashFiles('**/composer.lock') }}
all-build-
- name: Restore/cache tools folder
uses: actions/cache@v1
with:
path: tools
key: all-tools-${{ github.sha }}
restore-keys: |
all-tools-${{ github.sha }}-
all-tools-
- name: Code style check
uses: docker://phpdoc/phpcs-ga:latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
args: -d memory_limit=1024M

phpstan:
runs-on: ubuntu-latest
needs: [setup, phpunit]
steps:
- uses: actions/checkout@master
- name: Restore/cache vendor folder
uses: actions/cache@v1
with:
path: vendor
key: all-build-${{ hashFiles('**/composer.lock') }}
restore-keys: |
all-build-${{ hashFiles('**/composer.lock') }}
all-build-
- name: Restore/cache tools folder
uses: actions/cache@v1
with:
path: tools
key: all-tools-${{ github.sha }}
restore-keys: |
all-tools-${{ github.sha }}-
all-tools-
- name: PHPStan
uses: docker://phpdoc/phpstan-ga:latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
args: analyse src --level max --configuration phpstan.neon

psalm:
runs-on: ubuntu-latest
needs: [setup, phpunit]
steps:
- uses: actions/checkout@master
- name: Restore/cache vendor folder
uses: actions/cache@v1
with:
path: vendor
key: all-build-${{ hashFiles('**/composer.lock') }}
restore-keys: |
all-build-${{ hashFiles('**/composer.lock') }}
all-build-
- name: Restore/cache tools folder
uses: actions/cache@v1
with:
path: tools
key: all-tools-${{ github.sha }}
restore-keys: |
all-tools-${{ github.sha }}-
all-tools-
- name: Psalm
uses: docker://mickaelandrieu/psalm-ga
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions .phpunit.result.cache
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
C:37:"PHPUnit\Runner\DefaultTestResultCache":9315:{a:2:{s:7:"defects";a:0:{}s:5:"times";a:94:{s:72:"phpDocumentor\Reflection\CollectionResolverTest::testResolvingCollection";d:0.001;s:83:"phpDocumentor\Reflection\CollectionResolverTest::testResolvingCollectionWithKeyType";d:0;s:77:"phpDocumentor\Reflection\CollectionResolverTest::testResolvingArrayCollection";d:0;s:84:"phpDocumentor\Reflection\CollectionResolverTest::testResolvingArrayCollectionWithKey";d:0;s:97:"phpDocumentor\Reflection\CollectionResolverTest::testResolvingArrayCollectionWithKeyAndWhitespace";d:0;s:104:"phpDocumentor\Reflection\CollectionResolverTest::testResolvingArrayCollectionWithKeyAndTooManyWhitespace";d:0;s:84:"phpDocumentor\Reflection\CollectionResolverTest::testResolvingCollectionOfCollection";d:0;s:74:"phpDocumentor\Reflection\CollectionResolverTest::testBadArrayCollectionKey";d:0;s:75:"phpDocumentor\Reflection\CollectionResolverTest::testMissingStartCollection";d:0;s:73:"phpDocumentor\Reflection\CollectionResolverTest::testMissingEndCollection";d:0;s:71:"phpDocumentor\Reflection\CollectionResolverTest::testBadCollectionClass";d:0;s:79:"phpDocumentor\Reflection\CollectionResolverTest::testResolvingCollectionAsArray";d:0;s:60:"phpDocumentor\Reflection\FqsenResolverTest::testResolveFqsen";d:0;s:69:"phpDocumentor\Reflection\FqsenResolverTest::testResolveWithoutContext";d:0;s:64:"phpDocumentor\Reflection\FqsenResolverTest::testResolveFromAlias";d:0;s:71:"phpDocumentor\Reflection\FqsenResolverTest::testResolveFromPartialAlias";d:0;s:94:"phpDocumentor\Reflection\FqsenResolverTest::testResolveThrowsExceptionWhenGarbageInputIsPassed";d:0;s:81:"phpDocumentor\Reflection\TypeResolverTest::testResolvingKeywords with data set #0";d:0;s:81:"phpDocumentor\Reflection\TypeResolverTest::testResolvingKeywords with data set #1";d:0;s:81:"phpDocumentor\Reflection\TypeResolverTest::testResolvingKeywords with data set #2";d:0;s:81:"phpDocumentor\Reflection\TypeResolverTest::testResolvingKeywords with data set #3";d:0;s:81:"phpDocumentor\Reflection\TypeResolverTest::testResolvingKeywords with data set #4";d:0;s:81:"phpDocumentor\Reflection\TypeResolverTest::testResolvingKeywords with data set #5";d:0;s:81:"phpDocumentor\Reflection\TypeResolverTest::testResolvingKeywords with data set #6";d:0;s:81:"phpDocumentor\Reflection\TypeResolverTest::testResolvingKeywords with data set #7";d:0;s:81:"phpDocumentor\Reflection\TypeResolverTest::testResolvingKeywords with data set #8";d:0;s:81:"phpDocumentor\Reflection\TypeResolverTest::testResolvingKeywords with data set #9";d:0;s:82:"phpDocumentor\Reflection\TypeResolverTest::testResolvingKeywords with data set #10";d:0;s:82:"phpDocumentor\Reflection\TypeResolverTest::testResolvingKeywords with data set #11";d:0;s:82:"phpDocumentor\Reflection\TypeResolverTest::testResolvingKeywords with data set #12";d:0;s:82:"phpDocumentor\Reflection\TypeResolverTest::testResolvingKeywords with data set #13";d:0;s:82:"phpDocumentor\Reflection\TypeResolverTest::testResolvingKeywords with data set #14";d:0;s:82:"phpDocumentor\Reflection\TypeResolverTest::testResolvingKeywords with data set #15";d:0;s:82:"phpDocumentor\Reflection\TypeResolverTest::testResolvingKeywords with data set #16";d:0;s:82:"phpDocumentor\Reflection\TypeResolverTest::testResolvingKeywords with data set #17";d:0;s:82:"phpDocumentor\Reflection\TypeResolverTest::testResolvingKeywords with data set #18";d:0;s:82:"phpDocumentor\Reflection\TypeResolverTest::testResolvingKeywords with data set #19";d:0;s:82:"phpDocumentor\Reflection\TypeResolverTest::testResolvingKeywords with data set #20";d:0;s:88:"phpDocumentor\Reflection\TypeResolverTest::testResolvingFQSENs with data set "namespace"";d:0;s:84:"phpDocumentor\Reflection\TypeResolverTest::testResolvingFQSENs with data set "class"";d:0;s:85:"phpDocumentor\Reflection\TypeResolverTest::testResolvingRelativeQSENsBasedOnNamespace";d:0;s:90:"phpDocumentor\Reflection\TypeResolverTest::testResolvingRelativeQSENsBasedOnNamespaceAlias";d:0;s:67:"phpDocumentor\Reflection\TypeResolverTest::testResolvingTypedArrays";d:0;s:69:"phpDocumentor\Reflection\TypeResolverTest::testResolvingNullableTypes";d:0;s:73:"phpDocumentor\Reflection\TypeResolverTest::testResolvingNestedTypedArrays";d:0;s:69:"phpDocumentor\Reflection\TypeResolverTest::testResolvingCompoundTypes";d:0;s:79:"phpDocumentor\Reflection\TypeResolverTest::testResolvingCompoundTypedArrayTypes";d:0;s:77:"phpDocumentor\Reflection\TypeResolverTest::testResolvingNullableCompoundTypes";d:0;s:83:"phpDocumentor\Reflection\TypeResolverTest::testResolvingArrayExpressionObjectsTypes";d:0;s:82:"phpDocumentor\Reflection\TypeResolverTest::testResolvingArrayExpressionSimpleTypes";d:0;s:83:"phpDocumentor\Reflection\TypeResolverTest::testResolvingArrayOfArrayExpressionTypes";d:0;s:97:"phpDocumentor\Reflection\TypeResolverTest::testReturnEmptyCompoundOnAnUnclosedArrayExpressionType";d:0;s:86:"phpDocumentor\Reflection\TypeResolverTest::testResolvingArrayExpressionOrCompoundTypes";d:0;s:85:"phpDocumentor\Reflection\TypeResolverTest::testResolvingIterableExpressionSimpleTypes";d:0;s:82:"phpDocumentor\Reflection\TypeResolverTest::testResolvingCompoundTypesWithTwoArrays";d:0;s:61:"phpDocumentor\Reflection\TypeResolverTest::testAddingAKeyword";d:0.011;s:89:"phpDocumentor\Reflection\TypeResolverTest::testAddingAKeywordFailsIfTypeClassDoesNotExist";d:0;s:106:"phpDocumentor\Reflection\TypeResolverTest::testAddingAKeywordFailsIfTypeClassDoesNotImplementTypeInterface";d:0;s:77:"phpDocumentor\Reflection\TypeResolverTest::testExceptionIsThrownIfTypeIsEmpty";d:0;s:98:"phpDocumentor\Reflection\Types\ArrayTest::testArrayStringifyCorrectly with data set "simple array"";d:0;s:100:"phpDocumentor\Reflection\Types\ArrayTest::testArrayStringifyCorrectly with data set "array of mixed"";d:0;s:106:"phpDocumentor\Reflection\Types\ArrayTest::testArrayStringifyCorrectly with data set "array of single type"";d:0;s:108:"phpDocumentor\Reflection\Types\ArrayTest::testArrayStringifyCorrectly with data set "array of compound type"";d:0;s:105:"phpDocumentor\Reflection\Types\ArrayTest::testArrayStringifyCorrectly with data set "array with key type"";d:0;s:113:"phpDocumentor\Reflection\Types\CollectionTest::testCollectionStringifyCorrectly with data set "simple collection"";d:0;s:127:"phpDocumentor\Reflection\Types\CollectionTest::testCollectionStringifyCorrectly with data set "simple collection with key type"";d:0;s:142:"phpDocumentor\Reflection\Types\CollectionTest::testCollectionStringifyCorrectly with data set "collection of single type using specific class"";d:0;s:160:"phpDocumentor\Reflection\Types\CollectionTest::testCollectionStringifyCorrectly with data set "collection of single type with key type and using specific class"";d:0;s:84:"phpDocumentor\Reflection\Types\CompoundTest::testCompoundCannotBeConstructedFromType";d:0;s:64:"phpDocumentor\Reflection\Types\CompoundTest::testCompoundGetType";d:0;s:75:"phpDocumentor\Reflection\Types\CompoundTest::testCompoundGetNotExistingType";d:0;s:64:"phpDocumentor\Reflection\Types\CompoundTest::testCompoundHasType";d:0;s:75:"phpDocumentor\Reflection\Types\CompoundTest::testCompoundHasNotExistingType";d:0;s:96:"phpDocumentor\Reflection\Types\CompoundTest::testCompoundCanBeConstructedAndStringifiedCorrectly";d:0;s:70:"phpDocumentor\Reflection\Types\CompoundTest::testCompoundCanBeIterated";d:0;s:88:"phpDocumentor\Reflection\Types\ContextFactoryTest::testReadsNamespaceFromClassReflection";d:0.001;s:86:"phpDocumentor\Reflection\Types\ContextFactoryTest::testReadsAliasesFromClassReflection";d:0.001;s:100:"phpDocumentor\Reflection\Types\ContextFactoryTest::testReadsNamespaceFromProvidedNamespaceAndContent";d:0.001;s:98:"phpDocumentor\Reflection\Types\ContextFactoryTest::testReadsAliasesFromProvidedNamespaceAndContent";d:0.001;s:90:"phpDocumentor\Reflection\Types\ContextFactoryTest::testTraitUseIsNotDetectedAsNamespaceUse";d:0;s:107:"phpDocumentor\Reflection\Types\ContextFactoryTest::testAllOpeningBracesAreCheckedWhenSearchingForEndOfClass";d:0;s:68:"phpDocumentor\Reflection\Types\ContextFactoryTest::testEmptyFileName";d:0;s:65:"phpDocumentor\Reflection\Types\ContextFactoryTest::testEvalDClass";d:0;s:76:"phpDocumentor\Reflection\Types\ContextTest::testProvidesANormalizedNamespace";d:0;s:93:"phpDocumentor\Reflection\Types\ContextTest::testInterpretsNamespaceNamedGlobalAsRootNamespace";d:0;s:94:"phpDocumentor\Reflection\Types\ContextTest::testInterpretsNamespaceNamedDefaultAsRootNamespace";d:0;s:82:"phpDocumentor\Reflection\Types\ContextTest::testProvidesNormalizedNamespaceAliases";d:0;s:107:"phpDocumentor\Reflection\Types\IterableTest::testIterableStringifyCorrectly with data set "simple iterable"";d:0;s:109:"phpDocumentor\Reflection\Types\IterableTest::testIterableStringifyCorrectly with data set "iterable of mixed"";d:0;s:115:"phpDocumentor\Reflection\Types\IterableTest::testIterableStringifyCorrectly with data set "iterable of single type"";d:0;s:117:"phpDocumentor\Reflection\Types\IterableTest::testIterableStringifyCorrectly with data set "iterable of compound type"";d:0;s:114:"phpDocumentor\Reflection\Types\IterableTest::testIterableStringifyCorrectly with data set "iterable with key type"";d:0;s:75:"phpDocumentor\Reflection\Types\NullableTest::testNullableTypeWrapsCorrectly";d:0;s:75:"phpDocumentor\Reflection\Types\NullableTest::testNullableStringifyCorrectly";d:0;}}}
40 changes: 0 additions & 40 deletions .travis.yml

This file was deleted.

32 changes: 32 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
.PHONY: install-phive
install-phive:
mkdir tools; \
wget -O tools/phive.phar https://phar.io/releases/phive.phar; \
wget -O tools/phive.phar.asc https://phar.io/releases/phive.phar.asc; \
gpg --keyserver pool.sks-keyservers.net --recv-keys 0x9D8A98B29B2D5D79; \
gpg --verify tools/phive.phar.asc tools/phive.phar; \
chmod +x tools/phive.phar

.PHONY: setup
setup: install-phive
docker run -it --rm -v${PWD}:/opt/project -w /opt/project phpdoc/phar-ga:latest php tools/phive.phar install --force-accept-unsigned

.PHONY: phpcs
phpcs:
docker run -it --rm -v${PWD}:/opt/project -w /opt/project phpdoc/phpcs-ga:latest -d memory_limit=1024M

.PHONY: phpstan
phpstan:
docker run -it --rm -v${PWD}:/opt/project -w /opt/project phpdoc/phpstan-ga:latest analyse src --no-progress --level max --configuration phpstan.neon

.PHONY: psaml
psalm:
docker run -it --rm -v${PWD}:/opt/project -w /opt/project mickaelandrieu/psalm-ga

.PHONY: test
test:
docker run -it --rm -v${PWD}:/opt/project -w /opt/project php:7.2 tools/phpunit

.PHONY: pre-commit-test
pre-commit-test: test phpcs phpstan psalm

Loading