mirror of
https://github.com/openvk/openvk
synced 2025-03-04 00:29:57 +03:00
ci(actions): do analysing inside docker container
This commit is contained in:
parent
918d986cfa
commit
45e53b2a3e
1 changed files with 14 additions and 26 deletions
40
.github/workflows/analyse.yaml
vendored
40
.github/workflows/analyse.yaml
vendored
|
@ -15,34 +15,22 @@ jobs:
|
|||
|| (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
|
||||
- name: Code Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: openvk/chandler
|
||||
|
||||
- name: Install Chandler dependencies
|
||||
run: composer install --no-interaction --no-progress --no-suggest --prefer-dist
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Checkout OpenVK
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
path: extensions/available/openvk
|
||||
- name: Build and start Docker container
|
||||
working-directory: install/automated/docker
|
||||
run: |
|
||||
docker build -t openvk ../../.. -f openvk.Dockerfile
|
||||
|
||||
- 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
|
||||
- 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
|
||||
|
|
Loading…
Reference in a new issue