8000 Add unix socket test (#1061) · sanchezg/PyMySQL@3dc1abb · GitHub
[go: up one dir, main page]

Skip to content

Commit 3dc1abb

Browse files
Add unix socket test (PyMySQL#1061)
1 parent e77b218 commit 3dc1abb

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

.github/workflows/test.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,18 @@ jobs:
4545
env:
4646
MYSQL_ALLOW_EMPTY_PASSWORD: yes
4747
options: "--name=mysqld"
48+
volumes:
49+
- /run/mysqld:/run/mysqld
4850

4951
steps:
5052
- uses: actions/checkout@v2
53+
54+
- name: Workaround MySQL container permissions
55+
if: startsWith(matrix.db, 'mysql')
56+
run: |
57+
sudo chown 999:999 /run/mysqld
58+
/usr/bin/docker ps --all --filter status=exited --no-trunc --format "{{.ID}}" | xargs -r /usr/bin/docker start
59+
5160
- name: Set up Python ${{ matrix.py }}
5261
uses: actions/setup-python@v2
5362
with:

ci/docker.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
[
22
{"host": "127.0.0.1", "port": 3306, "user": "root", "password": "", "database": "test1", "use_unicode": true, "local_infile": true},
3-
{"host": "127.0.0.1", "port": 3306, "user": "test2", "password": "some password", "database": "test2" }
3+
{"host": "127.0.0.1", "port": 3306, "user": "test2", "password": "some password", "database": "test2" },
4+
{"host": "localhost", "port": 3306, "user": "test2", "password": "some password", "database": "test2", "unix_socket": "/run/mysqld/mysqld.sock"}
45
]

0 commit comments

Comments
 (0)
0