ci: clean up
Signed-off-by: Agnes Lin <agneslin.lin@ibm.com>
This commit is contained in:
parent
47b8a93455
commit
3a6c902416
|
@ -39,58 +39,24 @@ jobs:
|
||||||
node-version: ${{ matrix.node-version }}
|
node-version: ${{ matrix.node-version }}
|
||||||
|
|
||||||
|
|
||||||
# - uses: docker://library/mysql:5.7
|
- name: Set up MySQL 5.7
|
||||||
# - name: Set up MySQL 5.7
|
uses: mirromutth/mysql-action@master
|
||||||
# uses: mirromutth/mysql-action@master
|
with:
|
||||||
# with:
|
host port: 3000
|
||||||
# mysql version: 5.7
|
mysql version: 5.7
|
||||||
# mysql database: testdb
|
mysql database: testdb
|
||||||
# mysql root password: root
|
mysql root password: root
|
||||||
# - name: npm install, build, and test
|
- name: Wait for MySQL
|
||||||
# run: |
|
|
||||||
# npm install
|
|
||||||
# npm test
|
|
||||||
# env:
|
|
||||||
# CI: true
|
|
||||||
|
|
||||||
|
|
||||||
- name: Create DB and User
|
|
||||||
# # the first line is crucial
|
|
||||||
run: |
|
run: |
|
||||||
docker container ls
|
docker run -it -e MYSQL_ROOT_PASSWORD=root -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"
|
while ! mysqladmin ping --host=127.0.0.1 --port 3000 --password=$MYSQL_ROOT_PASSWORD --silent < ./test/schema.sql; do
|
||||||
sudo service mysql stop
|
sleep 1
|
||||||
|
done
|
||||||
mysql -V
|
mysql -V
|
||||||
# docker run -it mysql
|
- name: npm install, build, and test
|
||||||
# docker exec `docker ps -q` mysqld --version --mount "type=bind,src=/run/mysqld,dst=/var/run/mysqld"
|
run: |
|
||||||
# npm install
|
npm install
|
||||||
# npm test
|
npm test
|
||||||
# sudo /etc/init.d/mysql start
|
env:
|
||||||
# mysql -V
|
DB_PORT: 3306
|
||||||
# mysql --host 127.0.0.1 --port ${{ job.services.mysql.ports['3306'] }} -uroot -proot -e "SHOW DATABASES"
|
CI: true
|
||||||
# docker image ls
|
|
||||||
# docker container ls
|
|
||||||
# sudo systemctl enable mysql.service
|
|
||||||
# docker exec `docker ps -q` mysqld --version
|
|
||||||
# mysql -V
|
|
||||||
# mysql -e 'CREATE DATABASE testdb;' -uroot -proot
|
|
||||||
# mysql -e 'SHOW DATABASES;' -uroot -proot
|
|
||||||
# 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 "FLUSH PRIVILEGES"
|
|
||||||
# run: |
|
|
||||||
# sudo /etc/init.d/mysql start
|
|
||||||
# /usr/bin/docker
|
|
||||||
# docker.io/library/mysql:5.7
|
|
||||||
# sudo netstat -ln | grep mysql
|
|
||||||
# mysqladmin -proot -uroot root variables
|
|
||||||
# mysql -uroot -proot -e 'CREATE DATABASE testdb;'
|
|
||||||
# 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 "FLUSH PRIVILEGES"
|
|
||||||
# - run: npm install
|
|
||||||
# - run: npm test
|
|
||||||
# env:
|
|
||||||
# host: 127.0.0.1
|
|
||||||
# sudo ls -a /var/run/mysqld/
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue