Merge pull request #1 from webmasterskaya/test-workflows

Настроен статический анализ кода
This commit is contained in:
Artem Vasilev 2022-11-10 14:30:27 +03:00 committed by GitHub
commit 612031c8dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 11 additions and 8 deletions

View File

@ -1,8 +1,10 @@
name: "Static analysis code" name: "Static analysis code"
on: on:
- push push:
- pull_request branches:
- master
pull_request:
env: env:
COMPOSER_FLAGS: "--ansi --prefer-dist --no-interaction --no-progress" COMPOSER_FLAGS: "--ansi --prefer-dist --no-interaction --no-progress"
@ -24,7 +26,7 @@ jobs:
steps: steps:
- name: "Checkout" - name: "Checkout"
uses: "actions/checkout@v2" uses: "actions/checkout@v3"
- name: "Install PHP" - name: "Install PHP"
uses: "shivammathur/setup-php@v2" uses: "shivammathur/setup-php@v2"
@ -49,13 +51,13 @@ jobs:
- "7.4" - "7.4"
steps: steps:
- name: "Cancel Previous Runs" - name: "Cancel Previous Runs"
uses: styfle/cancel-workflow-action@0.9.0 uses: styfle/cancel-workflow-action@0.11.0
with: with:
all_but_latest: true all_but_latest: true
access_token: ${{ github.token }} access_token: ${{ github.token }}
- name: "Checkout" - name: "Checkout"
uses: "actions/checkout@v2" uses: "actions/checkout@v3"
- name: "Install PHP" - name: "Install PHP"
uses: "shivammathur/setup-php@v2" uses: "shivammathur/setup-php@v2"
@ -81,7 +83,7 @@ jobs:
run: | run: |
composer install ${{ env.COMPOSER_FLAGS }} composer install ${{ env.COMPOSER_FLAGS }}
rm composer.lock rm composer.lock
composer config platform.php ${{ matrix.php }} composer config platform.php ${{ matrix.php-version }}
- name: Run phpstan - name: Run phpstan
run: composer phpstan run: composer phpstan

View File

@ -29,7 +29,7 @@
} }
], ],
"require": { "require": {
"php": "=>7.2 <8.0", "php": ">=7.2 <8.0",
"ext-mbstring": "*" "ext-mbstring": "*"
}, },
"require-dev": { "require-dev": {

1
tmp/src.txt Executable file
View File

@ -0,0 +1 @@
foo bar master