File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3232 MYSQL_ALLOW_EMPTY_PASSWORD : yes
3333 MYSQL_DATABASE : index_digest
3434 ports :
35- - " 3306 :3306"
35+ - " 53306 :3306"
3636 options : --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
3737
3838 steps :
@@ -57,18 +57,20 @@ jobs:
5757 ${{ runner.os }}-pip-
5858
5959 - name : Install dependencies
60- run : make install
60+ run : |
61+ pip install wheel
62+ make install
6163
6264 - name : Linter
6365 run : make lint
6466
6567 - name : Set up the database
6668 run : |
6769 docker ps
68- mysql --protocol=tcp -u root -v < setup.sql
70+ mysql --protocol=tcp --port=53306 - u root --password="" -v < setup.sql
6971 # import the test schema files
7072 "./sql/populate.sh"
71- mysql --protocol=tcp -uindex_digest -pqwerty index_digest -v -e '\s; SHOW TABLES; SHOW DATABASES;'
73+ mysql --protocol=tcp --port=53306 - uindex_digest -pqwerty index_digest -v -e '\s; SHOW TABLES; SHOW DATABASES;'
7274
7375 - name : Tests
7476 run : make test
Original file line number Diff line number Diff line change 3737 MYSQL_ALLOW_EMPTY_PASSWORD : yes
3838 MYSQL_DATABASE : index_digest
3939 ports :
40- - " 3306 :3306"
40+ - " 53306 :3306"
4141 options : --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
4242
4343 steps :
@@ -62,18 +62,20 @@ jobs:
6262 ${{ runner.os }}-pip-
6363
6464 - name : Install dependencies
65- run : make install
65+ run : |
66+ pip install wheel
67+ make install
6668
6769 - name : Linter
6870 run : make lint
6971
7072 - name : Set up the database
7173 run : |
7274 docker ps
73- mysql --protocol=tcp -u root -v < setup.sql
75+ mysql --protocol=tcp --port=53306 - u root --password="" -v < setup.sql
7476 # import the test schema files
7577 "./sql/populate.sh"
76- mysql --protocol=tcp -uindex_digest -pqwerty index_digest -v -e '\s; SHOW TABLES; SHOW DATABASES;'
78+ mysql --protocol=tcp --port=53306 - uindex_digest -pqwerty index_digest -v -e '\s; SHOW TABLES; SHOW DATABASES;'
7779
7880 - name : Tests
7981 run : make test
Original file line number Diff line number Diff line change @@ -47,15 +47,15 @@ make install
4747We assume database is running locally on port 3306. You can use the following to test your changes locally before pushing them (this one uses MySQL 8.0.20):
4848
4949```
50- docker run -p 3306 :3306 --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 -e "MYSQL_ALLOW_EMPTY_PASSWORD=yes" -e "MYSQL_DATABASE=index_digest" mysql:8.0.20
50+ docker run --rm -p 53306 :3306 --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 -e "MYSQL_ALLOW_EMPTY_PASSWORD=yes" -e "MYSQL_DATABASE=index_digest" --name=index_digest_mysql mysql:8.0.22 "--default-authentication-plugin=mysql_native_password"
5151```
5252
5353Wait until the server is up and running.
5454
5555```
56- mysql --protocol=tcp -u root -v < setup.sql
56+ mysql --protocol=tcp --port=53306 - u root --password="" -v < setup.sql
5757./sql/populate.sh
58- mysql --protocol=tcp -uindex_digest -pqwerty index_digest -v -e '\s; SHOW TABLES; SHOW DATABASES;'
58+ mysql --protocol=tcp --port=53306 - uindex_digest -pqwerty index_digest -v -e '\s; SHOW TABLES; SHOW DATABASES;'
5959
6060make test
6161```
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ def read_queries_from_log(log_file):
1818
1919
2020class DatabaseTestMixin (object ):
21- DSN = 'mysql://index_digest:[email protected] /index_digest' 21+ DSN = 'mysql://index_digest:[email protected] :53306 /index_digest' 2222 DBNAME = 'index_digest'
2323
2424 @property
Original file line number Diff line number Diff line change @@ -5,6 +5,6 @@ FILES=`ls sql/*.sql`
55for FILE in $FILES
66do
77 echo -n " * Importing ${FILE} ... "
8- cat $FILE | mysql --protocol=tcp -uindex_digest -pqwerty index_digest 2>&1 | grep -v " Using a password"
8+ cat $FILE | mysql --protocol=tcp --port=53306 - uindex_digest -pqwerty index_digest 2>&1 | grep -v " Using a password"
99 echo " done"
1010done
You can’t perform that action at this time.
0 commit comments