forked from ptthao-yrglmvn/ec-cube2
-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (50 loc) · 1.5 KB
/
phpstan.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: PHPStan
run-name: PHPStan
on:
workflow_call:
inputs:
ref_name:
required: false
type: string
base_ref:
required: false
type: string
event_name:
required: true
type: string
owner:
required: true
type: string
jobs:
phpstan:
name: PHPStan
runs-on: ubuntu-latest
steps:
- name: "Checkout"
uses: actions/checkout@v4
- name: Build docker image
uses: ./.github/actions/dockerbuild
with:
php-version: '8.3'
- name: Setup environment
env:
REF_NAME: ${{ inputs.ref_name }}
BASE_REF: ${{ inputs.base_ref }}
EVENT_NAME: ${{ inputs.event_name }}
OWNER: ${{ inputs.owner }}
run: |
echo "COMPOSE_FILE=docker-compose.yml:docker-compose.pgsql.yml:docker-compose.dev.yml" >> $GITHUB_ENV
echo "IMAGE_NAME=${OWNER,,}/ec-cube2-php" >> $GITHUB_ENV
if [ $EVENT_NAME = "pull_request" ]; then
if [ -n $DOCKER_METADATA_OUTPUT_VERSION ]; then
echo "TAG=${DOCKER_METADATA_OUTPUT_VERSION}" >> $GITHUB_ENV
else
echo "TAG=8.3-apache-${BASE_REF}" >> $GITHUB_ENV
fi
else
echo "TAG=8.3-apache-${REF_NAME}" >> $GITHUB_ENV
fi
- run: |
docker compose up -d --wait
docker compose exec -T ec-cube composer install
- run: docker compose exec -T ec-cube php data/vendor/bin/phpstan --memory-limit=512M --no-progress analyze data/ --error-format=github