-
Notifications
You must be signed in to change notification settings - Fork 99
62 lines (58 loc) · 1.51 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
54
55
56
57
58
59
60
61
62
name: PHPStan
on:
push:
branches:
- '*'
tags:
- '*'
paths:
- '**'
- '!*.md'
pull_request:
paths:
- '**'
- '!*.md'
jobs:
phpstan:
name: PHPStan
runs-on: ubuntu-latest
services:
postgres:
image: postgres:15
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
POSTGRES_DB: postgres
ports:
- 5432:5432
# needed because the postgres container does not provide a healthcheck
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- name: "Checkout"
uses: actions/checkout@v3
- name: Setup PHP
uses: nanasess/setup-php@master
with:
php-version: '8.1'
- name: composer install
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # 暫定対応
run: |
sudo composer selfupdate
composer config github-oauth.github.com ${GITHUB_TOKEN}
composer install --dev --no-interaction -o --apcu-autoloader
composer require --dev --ignore-platform-req=php phpstan/phpstan
- name: Setup to EC-CUBE
env:
DB: pgsql
USER: postgres
DBUSER: postgres
DBPASS: password
DBNAME: eccube_db
DBPORT: 5432
HTTP_URL: http://localhost:8085/
HTTPS_URL: http://localhost:8085/
run: |
./eccube_install.sh ${DB}
- name: PHPStan
run: data/vendor/bin/phpstan analyze data/ --error-format=github