Skip to content

Commit

Permalink
Fix issue with MySQL server
Browse files Browse the repository at this point in the history
  • Loading branch information
mechanicles committed Aug 5, 2023
1 parent 7846db0 commit 93702a3
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -46,13 +47,13 @@ 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
run: bundle exec rake

- 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 }}

0 comments on commit 93702a3

Please sign in to comment.