ci: 3307 + mirror
Signed-off-by: Agnes Lin <agneslin.lin@ibm.com>
This commit is contained in:
parent
db499253e5
commit
47b8a93455
|
@ -13,7 +13,6 @@ jobs:
|
||||||
matrix:
|
matrix:
|
||||||
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
|
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
|
||||||
node-version: [10, 12, 14, 15]
|
node-version: [10, 12, 14, 15]
|
||||||
<<<<<<< HEAD
|
|
||||||
|
|
||||||
# services:
|
# services:
|
||||||
# mysql:
|
# mysql:
|
||||||
|
@ -28,22 +27,6 @@ jobs:
|
||||||
# ports:
|
# ports:
|
||||||
# - 3306:3306
|
# - 3306:3306
|
||||||
# options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
|
# options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
|
||||||
=======
|
|
||||||
services:
|
|
||||||
mysql:
|
|
||||||
image: mysql:5.7
|
|
||||||
env:
|
|
||||||
MYSQL_USER: user
|
|
||||||
MYSQL_PASSWORD: pass
|
|
||||||
MYSQL_ALLOW_EMPTY_PASSWORD: yes
|
|
||||||
MYSQL_DATABASE: testdb
|
|
||||||
MYSQL_ROOT_PASSWORD: root
|
|
||||||
MYSQL_HOST: localhost
|
|
||||||
MYSQL_PORT: 3307
|
|
||||||
ports:
|
|
||||||
- 3307:3307
|
|
||||||
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
|
|
||||||
>>>>>>> f50d049... ci: port 3307
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Shutdown Ubuntu MySQL (SUDO)
|
- name: Shutdown Ubuntu MySQL (SUDO)
|
||||||
|
@ -72,16 +55,12 @@ jobs:
|
||||||
|
|
||||||
|
|
||||||
- name: Create DB and User
|
- name: Create DB and User
|
||||||
# # # the first line is crucial
|
# # the first line is crucial
|
||||||
run: |
|
run: |
|
||||||
sudo /etc/init.d/mysql start
|
|
||||||
sudo systemctl enable mysql.service
|
|
||||||
sudo systemctl start mysql.service
|
|
||||||
docker container ls
|
docker container ls
|
||||||
docker container run -e MYSQL_ROOT_PASSWORD=root -e MYSQL_PORT=3307 -e MYSQL_HOST=localhost -d mysql:5.7
|
docker container run -e MYSQL_ROOT_PASSWORD=root -d mysql:5.7 --mount "type=bind,src=/run/mysqld,dst=/var/run/mysqld"
|
||||||
|
sudo service mysql stop
|
||||||
mysql -V
|
mysql -V
|
||||||
# sudo service mysql stop
|
|
||||||
# mysql -V
|
|
||||||
# docker run -it mysql
|
# docker run -it mysql
|
||||||
# docker exec `docker ps -q` mysqld --version --mount "type=bind,src=/run/mysqld,dst=/var/run/mysqld"
|
# docker exec `docker ps -q` mysqld --version --mount "type=bind,src=/run/mysqld,dst=/var/run/mysqld"
|
||||||
# npm install
|
# npm install
|
||||||
|
@ -109,10 +88,8 @@ jobs:
|
||||||
# mysql -uroot -proot -e "CREATE USER 'user'@'localhost' IDENTIFIED WITH mysql_native_password BY 'pass';"
|
# mysql -uroot -proot -e "CREATE USER 'user'@'localhost' IDENTIFIED WITH mysql_native_password BY 'pass';"
|
||||||
# mysql -uroot -proot -e "GRANT ALL PRIVILEGES ON * . * TO 'user'@'localhost';"
|
# mysql -uroot -proot -e "GRANT ALL PRIVILEGES ON * . * TO 'user'@'localhost';"
|
||||||
# mysql -uroot -proot -e "FLUSH PRIVILEGES"
|
# mysql -uroot -proot -e "FLUSH PRIVILEGES"
|
||||||
- run: npm install
|
# - run: npm install
|
||||||
- run: npm test
|
# - run: npm test
|
||||||
env:
|
|
||||||
DB_PORT: ${{ job.services.mysql.ports[3307] }}
|
|
||||||
# env:
|
# env:
|
||||||
# host: 127.0.0.1
|
# host: 127.0.0.1
|
||||||
# sudo ls -a /var/run/mysqld/
|
# sudo ls -a /var/run/mysqld/
|
||||||
|
|
Loading…
Reference in New Issue