mirror of
https://github.com/openvk/openvk
synced 2025-04-19 14:43:01 +03:00
ci(actions): add phpstan action
This commit is contained in:
parent
dda8481af4
commit
918d986cfa
1 changed files with 48 additions and 0 deletions
48
.github/workflows/analyse.yaml
vendored
Normal file
48
.github/workflows/analyse.yaml
vendored
Normal file
|
@ -0,0 +1,48 @@
|
||||||
|
name: Static analysis
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
pull_request:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
phpstan:
|
||||||
|
name: PHPStan
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
|
||||||
|
# 'push' runs on inner branches, 'pull_request' will run only on outer PRs
|
||||||
|
if: >
|
||||||
|
github.event_name == 'push'
|
||||||
|
|| (github.event_name == 'pull_request'
|
||||||
|
&& github.event.pull_request.head.repo.full_name != github.repository)
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
steps:
|
||||||
|
- name: Setup PHP
|
||||||
|
uses: shivammathur/setup-php@v2
|
||||||
|
with:
|
||||||
|
php-version: "8.2"
|
||||||
|
extensions: gd, zip, intl, yaml, pdo_mysql, rdkafka, imagick
|
||||||
|
tools: composer:v2
|
||||||
|
coverage: none
|
||||||
|
|
||||||
|
- name: Checkout Chandler
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
repository: openvk/chandler
|
||||||
|
|
||||||
|
- name: Install Chandler dependencies
|
||||||
|
run: composer install --no-interaction --no-progress --no-suggest --prefer-dist
|
||||||
|
|
||||||
|
- name: Checkout OpenVK
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
path: extensions/available/openvk
|
||||||
|
|
||||||
|
- name: Install OpenVK dependencies
|
||||||
|
working-directory: extensions/available/openvk
|
||||||
|
run: composer install --no-interaction --no-progress --no-suggest --prefer-dist
|
||||||
|
|
||||||
|
- name: PHPStan
|
||||||
|
working-directory: extensions/available/openvk
|
||||||
|
run: composer run-script analyse
|
Loading…
Reference in a new issue