Skip to content

Commit

Permalink
mysql config
Browse files Browse the repository at this point in the history
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
  • Loading branch information
shlomi-noach committed Aug 16, 2023
1 parent 7d9112c commit 01e6a5b
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 12 deletions.
29 changes: 18 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,21 @@ jobs:
ci:
runs-on: ubuntu-latest

services:
mysql:
image: mysql:8.0
env:
MYSQL_ALLOW_EMPTY_PASSWORD: true
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: test
ports:
- 33306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
# services:
# mysql:
# image: mysql:8.0
# env:
# MYSQL_ALLOW_EMPTY_PASSWORD: true
# MYSQL_ROOT_PASSWORD: root
# MYSQL_DATABASE: test
# ports:
# - 33306:3306
# options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3

env:
DB_DATABASE: test_db
DB_USER: root
DB_PASSWORD: root

steps:
- uses: actions/checkout@v3
Expand All @@ -36,7 +41,9 @@ jobs:
run: make test

- name: Start local MySQL
run: sudo systemctl start mysql
run: |
sudo systemctl start mysql
mysql -e 'CREATE DATABASE ${{ env.DB_DATABASE }};' -u${{ env.DB_USER }} -p${{ env.DB_PASSWORD }}
- name: MySQL Test
run: |
Expand Down
2 changes: 1 addition & 1 deletion script/ci-github.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ echo "${create_t1}" | schemadiff load > $output_file
grep -q 'CREATE TABLE' $output_file

alias my='mysql -uroot -proot --host 127.0.0.1 --port 33306'
my -e "create database if not exists test"
# my -e "create database if not exists test"
echo "${create_t1}" | my test


Expand Down

0 comments on commit 01e6a5b

Please sign in to comment.