ci: socket

Signed-off-by: Agnes Lin <agneslin.lin@ibm.com>
This commit is contained in:
Agnes Lin 2021-04-11 22:24:44 -04:00
parent 309bccb774
commit 755a6b2065
1 changed files with 14 additions and 22 deletions

View File

@ -48,27 +48,19 @@ jobs:
mysql root password: root
- name: Wait for MySQL
run: |
sudo ls /var/run/mysql
sudo systemctl start mysql
docker ps -a
# docker run -it -e MYSQL_ROOT_PASSWORD=root -v /var/run/mysqld:/host/mysqld -d mysql:5.7
# while ! mysqladmin ping --host=127.0.0.1 --port 3000 --password=$MYSQL_ROOT_PASSWORD --silent < ./test/schema.sql; do
# sleep 1
# done
# docker container ls
# mysql -uroot -proot "SHOW DATABASES;"
# - name: npm install, build, and test
# run: |
# npm install
# npm test
# env:
# DB_PORT: 3306
# CI: true
docker run -it -e MYSQL_ROOT_PASSWORD=root -v /var/run/mysqld:/host/mysqld -d mysql:5.7
while ! mysqladmin ping --host=127.0.0.1 --port 3000 --password=$MYSQL_ROOT_PASSWORD --silent < ./test/schema.sql; do
sleep 1
done
docker container ls
mysql -uroot -proot "SHOW DATABASES;"
- name: npm install, build, and test
run: |
npm install
npm test
env:
DB_PORT: 3306
CI: true
# docker run -it -e MYSQL_ROOT_PASSWORD=root -v /var/run/mysqld/mysqld.sock:/host/mysqld/mysqld.sock -d mysql:5.7