-
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.
Signed-off-by: Demin Yin <deminy@deminy.net>
- Loading branch information
Showing
7 changed files
with
67 additions
and
9 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,36 @@ | ||
name: Static Analysis | ||
|
||
on: [ push, pull_request, workflow_dispatch ] | ||
|
||
jobs: | ||
static-analysis: | ||
runs-on: ubuntu-22.04 | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: 8.2 | ||
tools: composer:v2 | ||
extensions: redis-stable, swoole-5.1.1, sysvmsg | ||
ini-values: swoole.enable_library=off | ||
coverage: none | ||
env: | ||
SWOOLE_CONFIGURE_OPTS: --enable-mysqlnd --enable-swoole-pgsql --enable-openssl --enable-sockets --enable-swoole-curl | ||
|
||
- name: Install PHPStan | ||
uses: nick-invision/retry@v2 | ||
with: | ||
timeout_minutes: 5 | ||
max_attempts: 5 | ||
command: | | ||
set -ex | ||
composer global require phpstan/phpstan=^1.11.x-dev -n -q --no-progress | ||
composer global require predis/predis=~2.2 -n -q --no-progress | ||
composer global require swoole/library=~5.0 -n -q --no-progress | ||
- name: Run Static Analysis | ||
run: ~/.composer/vendor/bin/phpstan analyse --no-progress --memory-limit 2G |
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
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
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
parameters: | ||
level: 0 | ||
paths: | ||
- ./examples |