Merge pull request #5729 from wallabag/fix/php-7.2-7.3-mysql

This commit is contained in:
Jérémy Benoist 2022-04-12 15:17:36 +02:00 committed by GitHub
commit 23f12f853d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 18 additions and 8 deletions

View File

@ -14,7 +14,7 @@ jobs:
steps:
- name: "Checkout"
uses: "actions/checkout@v2"
uses: "actions/checkout@v3"
- name: "Install Node"
uses: actions/setup-node@v2

View File

@ -14,7 +14,7 @@ jobs:
steps:
- name: "Checkout"
uses: "actions/checkout@v2"
uses: "actions/checkout@v3"
- name: "Install PHP"
uses: "shivammathur/setup-php@v2"

View File

@ -41,7 +41,7 @@ jobs:
steps:
- name: "Checkout"
uses: "actions/checkout@v2"
uses: "actions/checkout@v3"
with:
fetch-depth: 2
@ -54,11 +54,21 @@ jobs:
extensions: json, pdo, pdo_mysql, pdo_sqlite, pdo_pgsql, curl, imagick, pgsql, gd, tidy
ini-values: "date.timezone=Europe/Paris"
- name: "Install MySQL (for PHP < 7.4)"
# there is an issue with PHP < 7.4 and MySQL 8 with `caching_sha2_password`
if: "${{ matrix.database == 'mysql' && (matrix.php == '7.2' || matrix.php == '7.3') }}"
uses: shogo82148/actions-setup-mysql@v1
with:
root-password: root
mysql-version: '5.7'
- name: "Install MySQL (for PHP >= 7.4)"
if: "${{ matrix.database == 'mysql' && matrix.php != '7.2' && matrix.php != '7.3' }}"
run: sudo systemctl start mysql.service
- name: "Setup MySQL"
if: "${{ matrix.database == 'mysql' }}"
run: |
sudo systemctl start mysql.service
sudo mysql -u root -proot -e "CREATE DATABASE wallabag_test"
run: sudo mysql -u root -proot -h 127.0.0.1 -e "CREATE DATABASE wallabag_test"
- name: "Setup PostgreSQL"
if: "${{ matrix.database == 'pgsql' }}"

View File

@ -19,7 +19,7 @@ jobs:
steps:
- name: "Checkout"
uses: "actions/checkout@v2"
uses: "actions/checkout@v3"
- name: "Install PHP"
uses: "shivammathur/setup-php@v2"

View File

@ -1,6 +1,6 @@
parameters:
test_database_driver: pdo_mysql
test_database_host: localhost
test_database_host: 127.0.0.1
test_database_port: 3306
test_database_name: wallabag_test
test_database_user: root