Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try to enable MariaDB in CI #36049

Draft
wants to merge 6 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 8 additions & 5 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ jobs:
extensions: mbstring, intl, gd, xml, dom, json, fileinfo, curl, zip, iconv
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Setup MySQL
uses: mirromutth/mysql-action@v1.1
- name: Setup MariaDB
uses: getong/mariadb-action@v1.1
with:
mysql version: '8.0'
mariadb version: '11.3.2'
mysql database: 'prestashop'
mysql root password: 'password'
- name: Setup Node
Expand Down Expand Up @@ -74,8 +74,11 @@ jobs:
- name: Build all assets
run: make assets

- name: Change MySQL authentication method
run: mysql -h127.0.0.1 -uroot -ppassword -e "ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY 'password'; FLUSH PRIVILEGES;"
- name: Add a pause to be sure that MariaDB is up
run: until mysql -h 127.0.0.1 -u root -ppassword -e 'select 1'; do sleep 1; echo not there yet; done; echo "ready"

- name: Change MariaDB authentication method
run: mysql -h127.0.0.1 -uroot -ppassword -e "ALTER USER root@localhost IDENTIFIED VIA mysql_native_password USING PASSWORD('password'); FLUSH PRIVILEGES;"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This chunk isn't needed. The mysql root password of the getlong/mariadb-action will set the password. Also `FLUSH PRIVILEGES isn't required after any ALTER USER or other SQL statement granting privs/user changes.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried to remove it, but it fails too. I don't know why, I can't debug the error https://github.com/PrestaShop/PrestaShop/actions/runs/8892768244/job/24417552756?pr=36049
if you have any idea ...


- name: Run integration-tests
run: composer run-script integration-tests --timeout=0
Expand Down
3 changes: 3 additions & 0 deletions tests/Resources/DatabaseDump.php
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,9 @@ private function exec($command): array
throw new Exception(sprintf('Unable to exec command: `%s`, output : %s', $command, implode($output)));
}

var_dump('output' . $output);
var_dump('ret' . $ret);

return $output;
}

Expand Down