-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
404 additions
and
4,347 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 |
---|---|---|
@@ -1,162 +1,186 @@ | ||
on: pull_request | ||
name: Test & Code Style Review | ||
jobs: | ||
test-composer-install: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
php: ['7.4', '7.3'] | ||
name: Validate composer (${{ matrix.php}}) | ||
steps: | ||
- uses: actions/checkout@master | ||
|
||
- name: Setup PHP, with composer and extensions | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php}} | ||
extension: apcu, ctype, iconv, imagick, json, redis, soap, xmlreader, zip | ||
coverage: none | ||
|
||
- name: Get composer cache directory | ||
id: composer-cache | ||
run: echo "::set-output name=dir::$(composer config cache-files-dir)" | ||
- uses: actions/cache@v1 | ||
with: | ||
path: ${{ steps.composer-cache.outputs.dir }} | ||
key: ${{ matrix.php }}-composer-${{ hashFiles('**/composer.lock') }} | ||
restore-keys: ${{ matrix.php }}-composer- | ||
|
||
- name: Validate composer files | ||
run: composer validate composer.json | ||
|
||
- name: Composer install with exported .env variables | ||
run: | | ||
set -a && source .env && set +a | ||
APP_ENV=prod composer install --no-dev -o | ||
unit_tests: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
php: ['7.4', '7.3'] | ||
name: Unit tests (${{ matrix.php}}) | ||
steps: | ||
- uses: actions/checkout@master | ||
|
||
- name: Setup PHP, with composer and extensions | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php}} | ||
extension: apcu, ctype, iconv, imagick, json, redis, soap, xmlreader, zip | ||
coverage: xdebug | ||
|
||
- name: Get composer cache directory | ||
id: composer-cache | ||
run: echo "::set-output name=dir::$(composer config cache-files-dir)" | ||
- uses: actions/cache@v1 | ||
with: | ||
path: ${{ steps.composer-cache.outputs.dir }} | ||
key: ${{ matrix.php }}-composer-${{ hashFiles('**/composer.lock') }} | ||
restore-keys: ${{ matrix.php }}-composer- | ||
|
||
- name: Install Dependencies | ||
run: composer install -q --no-ansi --no-interaction --no-scripts --no-suggest --no-progress --prefer-dist | ||
|
||
- name: Unit tests | ||
run: ./vendor/bin/simple-phpunit --coverage-clover=coverage/unit.xml | ||
|
||
- name: Report coverage to Codecov | ||
env: | ||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | ||
run: | | ||
bash <(curl -s https://codecov.io/bash) -F Unit -f coverage/unit.xml | ||
runner-phpcs: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
php: ['7.4', '7.3'] | ||
name: Coding style (${{ matrix.php }}) | ||
steps: | ||
- uses: actions/checkout@master | ||
|
||
- name: Setup PHP, with composer and extensions | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php }} | ||
extension: apcu, ctype, iconv, imagick, json, redis, soap, xmlreader, zip | ||
coverage: none | ||
|
||
- name: Install Reviewdog | ||
run: wget -O - -q https://raw.githubusercontent.com/reviewdog/reviewdog/master/install.sh| sh -s -- -b $PWD/ v0.9.14 | ||
|
||
- name: Get composer cache directory | ||
id: composer-cache | ||
run: echo "::set-output name=dir::$(composer config cache-files-dir)" | ||
- uses: actions/cache@v1 | ||
with: | ||
path: ${{ steps.composer-cache.outputs.dir }} | ||
key: ${{ matrix.php }}-composer-${{ hashFiles('**/composer.lock') }} | ||
restore-keys: ${{ matrix.php }}-composer- | ||
|
||
- name: Install Dependencies | ||
run: composer install -q --no-ansi --no-interaction --no-scripts --no-suggest --no-progress --prefer-dist | ||
|
||
- name: PHPCS | ||
run: composer actions/phpcs | ./reviewdog -f=checkstyle -name=PHPCS -reporter=github-pr-check | ||
env: | ||
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
phpcsfixer: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
php: ['7.4', '7.3'] | ||
name: Coding style fixer (${{ matrix.php }}) | ||
steps: | ||
- uses: actions/checkout@master | ||
|
||
- name: Setup PHP, with composer and extensions | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php }} | ||
extension: apcu, ctype, iconv, imagick, json, redis, soap, xmlreader, zip | ||
coverage: none | ||
|
||
- name: Get composer cache directory | ||
id: composer-cache | ||
run: echo "::set-output name=dir::$(composer config cache-files-dir)" | ||
- uses: actions/cache@v1 | ||
with: | ||
path: ${{ steps.composer-cache.outputs.dir }} | ||
key: ${{ matrix.php }}-composer-${{ hashFiles('**/composer.lock') }} | ||
restore-keys: ${{ matrix.php }}-composer- | ||
|
||
- name: Install Dependencies | ||
run: composer install -q --no-ansi --no-interaction --no-scripts --no-suggest --no-progress --prefer-dist | ||
|
||
- name: phpcsfixerr | ||
run: composer actions/phpcsfixer | ||
|
||
phan: | ||
name: PHAN | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
|
||
- name: Setup PHP, with composer and extensions | ||
uses: shivammathur/setup-php@master | ||
with: | ||
php-version: 7.3 | ||
extension-csv: ctype, iconv, json | ||
coverage: none | ||
|
||
- name: Install Dependencies | ||
run: composer install -q --no-ansi --no-interaction --no-scripts --no-suggest --no-progress --prefer-dist | ||
|
||
- name: PHAN | ||
run: composer actions/phan | ||
|
||
test-composer-install: | ||
name: Validate composer (${{ matrix.php}}) / (${{ matrix.dependency-version}}) | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
php: [ '7.4', '8.0' ] | ||
dependency-version: [ prefer-lowest, prefer-stable ] | ||
steps: | ||
- uses: actions/checkout@master | ||
|
||
- name: Setup PHP, with composer and extensions | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php}} | ||
coverage: none | ||
|
||
- name: Get composer cache directory | ||
id: composer-cache | ||
run: echo "::set-output name=dir::$(composer config cache-files-dir)" | ||
|
||
- name: Cache dependencies | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ steps.composer-cache.outputs.dir }} | ||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}-${{ matrix.dependency-version }}- | ||
restore-keys: ${{ runner.os }}-composer-${{ matrix.dependency-version }}- | ||
|
||
- name: Validate composer files | ||
run: composer validate composer.json --strict | ||
|
||
- name: Install dependencies | ||
run: | | ||
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction | ||
unit-tests: | ||
name: Unit tests (${{ matrix.php }}) / (${{ matrix.dependency-version }}) | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
php: ['7.4', '8.0'] | ||
dependency-version: [ prefer-lowest, prefer-stable ] | ||
steps: | ||
- uses: actions/checkout@master | ||
|
||
- name: Setup PHP, with composer and extensions | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php}} | ||
coverage: xdebug | ||
|
||
- name: Get composer cache directory | ||
id: composer-cache | ||
run: echo "::set-output name=dir::$(composer config cache-files-dir)" | ||
|
||
- name: Cache dependencies | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ steps.composer-cache.outputs.dir }} | ||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}-${{ matrix.dependency-version }}- | ||
restore-keys: ${{ runner.os }}-composer-${{ matrix.dependency-version }}- | ||
|
||
- name: Install dependencies | ||
run: | | ||
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction | ||
- name: Unit tests | ||
run: ./vendor/bin/simple-phpunit --coverage-clover=coverage/unit.xml | ||
|
||
- name: Upload coverage to Codecov test | ||
uses: codecov/codecov-action@v1 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
files: ./coverage/unit.xml | ||
flags: unittests, ${{ matrix.php }}, ${{ matrix.dependency-version }} | ||
fail_ci_if_error: false | ||
verbose: true | ||
|
||
runner-phpcs: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
php: [ '7.4' ] | ||
name: Coding style (${{ matrix.php }}) | ||
steps: | ||
- uses: actions/checkout@master | ||
|
||
- name: Setup PHP, with composer and extensions | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php }} | ||
extension: apcu, ctype, iconv, imagick, json, redis, soap, xmlreader, zip | ||
coverage: none | ||
|
||
- name: Install Reviewdog | ||
run: wget -O - -q https://raw.githubusercontent.com/reviewdog/reviewdog/master/install.sh| sh -s -- -b $PWD/ v0.9.14 | ||
|
||
- name: Get composer cache directory | ||
id: composer-cache | ||
run: echo "::set-output name=dir::$(composer config cache-files-dir)" | ||
- uses: actions/cache@v1 | ||
with: | ||
path: ${{ steps.composer-cache.outputs.dir }} | ||
key: ${{ matrix.php }}-composer-${{ hashFiles('**/composer.lock') }} | ||
restore-keys: ${{ matrix.php }}-composer- | ||
|
||
- name: Install Dependencies | ||
run: composer install -q --no-ansi --no-interaction --no-scripts --no-suggest --no-progress --prefer-dist | ||
|
||
- name: PHPCS | ||
run: composer actions/phpcs | ./reviewdog -f=checkstyle -name=PHPCS -reporter=github-pr-check | ||
env: | ||
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
phpcsfixer: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
php: [ '7.4' ] | ||
name: Coding style fixer (${{ matrix.php }}) | ||
steps: | ||
- uses: actions/checkout@master | ||
|
||
- name: Setup PHP, with composer and extensions | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php }} | ||
extension: apcu, ctype, iconv, imagick, json, redis, soap, xmlreader, zip | ||
coverage: none | ||
|
||
- name: Get composer cache directory | ||
id: composer-cache | ||
run: echo "::set-output name=dir::$(composer config cache-files-dir)" | ||
- uses: actions/cache@v1 | ||
with: | ||
path: ${{ steps.composer-cache.outputs.dir }} | ||
key: ${{ matrix.php }}-composer-${{ hashFiles('**/composer.lock') }} | ||
restore-keys: ${{ matrix.php }}-composer- | ||
|
||
- name: Install Dependencies | ||
run: composer install -q --no-ansi --no-interaction --no-scripts --no-suggest --no-progress --prefer-dist | ||
|
||
- name: phpcsfixerr | ||
run: composer actions/phpcsfixer | ||
|
||
psalm: | ||
name: Psalm | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Psalm | ||
uses: docker://vimeo/psalm-github-actions | ||
|
||
markdownlint: | ||
name: Markdown Lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Get yarn cache directory path | ||
id: yarn-cache-dir-path | ||
run: echo "::set-output name=dir::$(yarn cache dir)" | ||
- name: Cache yarn packages | ||
uses: actions/cache@v2 | ||
id: yarn-cache | ||
with: | ||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn- | ||
- name: Yarn install | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '14' | ||
- run: yarn install | ||
- name: markdownlint | ||
run: yarn markdownlint README.md |
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 |
---|---|---|
|
@@ -19,3 +19,6 @@ | |
/.php_cs.cache | ||
###< friendsofphp/php-cs-fixer ### | ||
coverage | ||
node_modules | ||
yarn.lock | ||
composer.lock |
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,4 @@ | ||
{ | ||
"default": true, | ||
"line-length": false | ||
} |
Oops, something went wrong.