From 93702a31027e6ab77f2d9d2718a37b0f10795321 Mon Sep 17 00:00:00 2001 From: Santosh Wadghule Date: Sat, 5 Aug 2023 16:23:19 +0530 Subject: [PATCH] Fix issue with MySQL server --- .github/workflows/main.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e7f2c4d..b6d28b5 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -16,11 +16,12 @@ jobs: - 5432:5432 options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 mysql: - image: mysql:latest + image: mysql:5.7 env: - MYSQL_ROOT_PASSWORD: rootpassword + MYSQL_ROOT_PASSWORD: password ports: - - 3306:3306 + - 32574:3306 + options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 steps: - name: Checkout code @@ -46,8 +47,8 @@ jobs: - name: Create MySQL and PostgreSQL databases run: | - mysql -u root -e "CREATE DATABASE set_as_primary_test;" - mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root mysql + sudo apt-get install -y mysql-client + mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -e "CREATE DATABASE set_as_primary_test;" createdb set_as_primary_test - name: Run tests @@ -55,4 +56,4 @@ jobs: - name: Upload test coverage results to Code Climate if: always() && ${{ github.ref == 'refs/heads/master' }} # Adjust the branch name if needed - run: ./cc-test-reporter after-build --debug --exit-code ${{ job.status }} + run: ./cc-test-reporter after-build --debug --exit-code ${{ job.status }} \ No newline at end of file