mirror of
https://github.com/barryvdh/ReflectionDocBlock.git
synced 2026-08-18 18:13:13 +00:00
Add phpdoc workflow
This commit is contained in:
+188
-10
@@ -1,35 +1,213 @@
|
|||||||
on: push
|
on: push
|
||||||
name: Qa workflow
|
name: Qa workflow
|
||||||
jobs:
|
jobs:
|
||||||
qa-checks:
|
setup:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@master
|
- 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
|
- name: composer
|
||||||
uses: docker://composer
|
uses: docker://composer
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
with:
|
with:
|
||||||
args: install --no-interaction --prefer-dist --optimize-autoloader
|
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
|
- name: composer-require-checker
|
||||||
uses: docker://phpga/composer-require-checker-ga
|
uses: docker://phpga/composer-require-checker-ga
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
with:
|
with:
|
||||||
args: check --config-file ./composer-require-config.json composer.json
|
args: check --config-file ./composer-require-config.json composer.json
|
||||||
- name: Psalm
|
- name: Install phive
|
||||||
uses: docker://mickaelandrieu/psalm-ga
|
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:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
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
|
- name: PHPStan
|
||||||
uses: docker://oskarstark/phpstan-ga
|
uses: docker://phpdoc/phpstan-ga:latest
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
with:
|
with:
|
||||||
args: analyse src --level max --configuration phpstan.neon
|
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 }}
|
||||||
|
|
||||||
|
bc_check:
|
||||||
|
name: BC Check
|
||||||
|
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: Roave BC Check
|
||||||
|
uses: docker://nyholm/roave-bc-check-ga
|
||||||
|
|||||||
Reference in New Issue
Block a user