File tree Expand file tree Collapse file tree 5 files changed +17
-13
lines changed Expand file tree Collapse file tree 5 files changed +17
-13
lines changed Original file line number Diff line number Diff line change 32
32
MYSQL_ALLOW_EMPTY_PASSWORD : yes
33
33
MYSQL_DATABASE : index_digest
34
34
ports :
35
- - " 3306 :3306"
35
+ - " 53306 :3306"
36
36
options : --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
37
37
38
38
steps :
@@ -57,18 +57,20 @@ jobs:
57
57
${{ runner.os }}-pip-
58
58
59
59
- name : Install dependencies
60
- run : make install
60
+ run : |
61
+ pip install wheel
62
+ make install
61
63
62
64
- name : Linter
63
65
run : make lint
64
66
65
67
- name : Set up the database
66
68
run : |
67
69
docker ps
68
- mysql --protocol=tcp -u root -v < setup.sql
70
+ mysql --protocol=tcp --port=53306 - u root --password="" -v < setup.sql
69
71
# import the test schema files
70
72
"./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;'
72
74
73
75
- name : Tests
74
76
run : make test
Original file line number Diff line number Diff line change 37
37
MYSQL_ALLOW_EMPTY_PASSWORD : yes
38
38
MYSQL_DATABASE : index_digest
39
39
ports :
40
- - " 3306 :3306"
40
+ - " 53306 :3306"
41
41
options : --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
42
42
43
43
steps :
@@ -62,18 +62,20 @@ jobs:
62
62
${{ runner.os }}-pip-
63
63
64
64
- name : Install dependencies
65
- run : make install
65
+ run : |
66
+ pip install wheel
67
+ make install
66
68
67
69
- name : Linter
68
70
run : make lint
69
71
70
72
- name : Set up the database
71
73
run : |
72
74
docker ps
73
- mysql --protocol=tcp -u root -v < setup.sql
75
+ mysql --protocol=tcp --port=53306 - u root --password="" -v < setup.sql
74
76
# import the test schema files
75
77
"./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;'
77
79
78
80
- name : Tests
79
81
run : make test
Original file line number Diff line number Diff line change @@ -47,15 +47,15 @@ make install
47
47
We 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):
48
48
49
49
```
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"
51
51
```
52
52
53
53
Wait until the server is up and running.
54
54
55
55
```
56
- mysql --protocol=tcp -u root -v < setup.sql
56
+ mysql --protocol=tcp --port=53306 - u root --password="" -v < setup.sql
57
57
./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;'
59
59
60
60
make test
61
61
```
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ def read_queries_from_log(log_file):
18
18
19
19
20
20
class DatabaseTestMixin (object ):
21
- DSN = 'mysql://index_digest:qwerty@127.0.0.1/index_digest'
21
+ DSN = 'mysql://index_digest:qwerty@127.0.0.1:53306 /index_digest'
22
22
DBNAME = 'index_digest'
23
23
24
24
@property
Original file line number Diff line number Diff line change @@ -5,6 +5,6 @@ FILES=`ls sql/*.sql`
5
5
for FILE in $FILES
6
6
do
7
7
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"
9
9
echo " done"
10
10
done
You can’t perform that action at this time.
0 commit comments