連続してテストを実行すると、何故か MySQL の prepare statement に失敗する対策 #632
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |