-
Notifications
You must be signed in to change notification settings - Fork 24
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
9 changed files
with
465 additions
and
29 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,13 @@ | ||
/.github export-ignore | ||
/docs export-ignore | ||
/examples export-ignore | ||
/tests export-ignore | ||
/.editorconfig export-ignore | ||
/.gitattributes export-ignore | ||
/.gitignore export-ignore | ||
/phpunit.xml.dist export-ignore | ||
/phpstan.neon.dist export-ignore | ||
|
||
# Configure diff output for .php and .phar files. | ||
*.php diff=php | ||
*.phar -diff |
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,12 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: composer | ||
directory: "/" | ||
schedule: | ||
interval: daily | ||
open-pull-requests-limit: 10 | ||
|
||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: daily |
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,68 @@ | ||
# When a PR is opened or a push is made, perform | ||
# a static analysis check on the code using PHPStan. | ||
name: PHPStan | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- 'develop' | ||
paths: | ||
- 'app/**' | ||
- 'tests/**' | ||
- 'phpstan*' | ||
- '.github/workflows/analyze.yml' | ||
push: | ||
branches: | ||
- 'develop' | ||
paths: | ||
- 'app/**' | ||
- 'tests/**' | ||
- 'phpstan*' | ||
- '.github/workflows/analyze.yml' | ||
|
||
jobs: | ||
build: | ||
name: Analyze code | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: latest | ||
tools: composer, pecl, phpunit | ||
extensions: intl, json, mbstring, mysqlnd, xdebug, xml, sqlite3 | ||
|
||
- name: Get composer cache directory | ||
id: composer-cache | ||
run: echo "::set-output name=dir::$(composer config cache-files-dir)" | ||
|
||
- name: Create composer cache directory | ||
run: mkdir -p ${{ steps.composer-cache.outputs.dir }} | ||
|
||
- name: Cache composer dependencies | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ steps.composer-cache.outputs.dir }} | ||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | ||
restore-keys: ${{ runner.os }}-composer- | ||
|
||
- name: Create PHPStan cache directory | ||
run: mkdir -p build/phpstan | ||
|
||
- name: Cache PHPStan results | ||
uses: actions/cache@v2 | ||
with: | ||
path: build/phpstan | ||
key: ${{ runner.os }}-phpstan-${{ github.sha }} | ||
restore-keys: ${{ runner.os }}-phpstan- | ||
|
||
- name: Install dependencies | ||
run: composer install --no-progress --no-interaction --prefer-dist --optimize-autoloader | ||
# env: | ||
# COMPOSER_AUTH: ${{ secrets.COMPOSER_AUTH }} | ||
|
||
- name: Run static analysis | ||
run: vendor/bin/phpstan analyze |
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
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 |
---|---|---|
|
@@ -123,5 +123,5 @@ nb-configuration.xml | |
|
||
/results/ | ||
/phpunit*.xml | ||
/.phpunit.*.cache | ||
/*.cache | ||
|
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.