2025-01-31 19:57:54 +03:00
|
|
|
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)
|
|
|
|
|
|
|
|
steps:
|
2025-01-31 20:28:34 +03:00
|
|
|
- name: Code Checkout
|
2025-01-31 19:57:54 +03:00
|
|
|
uses: actions/checkout@v4
|
|
|
|
|
2025-01-31 20:28:34 +03:00
|
|
|
- name: Set up Docker Buildx
|
|
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
|
|
|
|
- name: Build and start Docker container
|
|
|
|
working-directory: install/automated/docker
|
|
|
|
run: |
|
|
|
|
docker build -t openvk ../../.. -f openvk.Dockerfile
|
|
|
|
|
|
|
|
- name: Run Docker container with PHPStan
|
|
|
|
working-directory: install/automated/docker
|
|
|
|
run: |
|
|
|
|
docker container run --rm \
|
|
|
|
-v ./chandler.example.yml:/opt/chandler/chandler.yml \
|
|
|
|
-v ./openvk.example.yml:/opt/chandler/extensions/available/openvk/openvk.yml \
|
|
|
|
openvk vendor/bin/phpstan analyse --memory-limit 1G
|