diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7c1b0bc4f6..5d68c1a736 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -177,11 +177,14 @@ jobs: - name: composer install run: composer install --no-interaction -o - - name: Setup to database + - name: Start PostgreSQL on Windows + # see https://www.cybertec-postgresql.com/en/postgresql-github-actions-continuous-integration/ run: | - choco install -y mysql - mysql --user=root -e "CREATE DATABASE eccube_db DEFAULT COLLATE=utf8_general_ci;" - mysql --user=root -e "GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY 'password' WITH GRANT OPTION;FLUSH PRIVILEGES;" + $pgService = Get-Service -Name postgresql* + Set-Service -InputObject $pgService -Status running -StartupType automatic + Start-Process -FilePath "$env:PGBIN\pg_isready" -Wait -PassThru + $env:PGPASSWORD = 'root' + & $env:PGBIN\createdb --owner=postgres eccube_db - name: Setup PHP uses: nanasess/setup-php@master @@ -190,16 +193,19 @@ jobs: - name: Setup to EC-CUBE env: - DB: mysql - USER: root - DBUSER: root - DBPASS: password + DB: pgsql + DBUSER: postgres + DBPASS: root DBNAME: eccube_db - DBPORT: 3306 + DBPORT: 5432 DBSERVER: 127.0.0.1 HTTP_URL: http://127.0.0.1:8085/ HTTPS_URL: http://127.0.0.1:8085/ - run: bash eccube_install.sh mysql + run: | + echo $PGBIN + ls -al $PGBIN + export PATH="$PGBIN:$PATH" + bash eccube_install.sh pgsql shell: bash - run: sleep 1 shell: bash