ci: start over wirh builtin mysql]
Signed-off-by: Agnes Lin <agneslin.lin@ibm.com>
This commit is contained in:
parent
473881bb02
commit
814d718a37
|
@ -12,21 +12,22 @@ jobs:
|
||||||
strategy:
|
strategy:
|
||||||
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: [12]
|
||||||
|
# node-version: [10, 12, 14, 15]
|
||||||
|
|
||||||
# services:
|
services:
|
||||||
# mysql:
|
mysql:
|
||||||
# image: mysql:5.7
|
image: mysql:5.7
|
||||||
# env:
|
env:
|
||||||
# MYSQL_USER: user
|
MYSQL_USER: user
|
||||||
# MYSQL_PASSWORD: pass
|
MYSQL_PASSWORD: pass
|
||||||
# MYSQL_ALLOW_EMPTY_PASSWORD: yes
|
MYSQL_ALLOW_EMPTY_PASSWORD: yes
|
||||||
# MYSQL_DATABASE: 'testdb'
|
MYSQL_DATABASE: testdb
|
||||||
# MYSQL_ROOT_PASSWORD: root
|
MYSQL_ROOT_PASSWORD: root
|
||||||
# MYSQL_HOST: localhost
|
MYSQL_HOST: localhost
|
||||||
# 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
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Shutdown Ubuntu MySQL (SUDO)
|
- name: Shutdown Ubuntu MySQL (SUDO)
|
||||||
|
@ -39,27 +40,27 @@ jobs:
|
||||||
node-version: ${{ matrix.node-version }}
|
node-version: ${{ matrix.node-version }}
|
||||||
|
|
||||||
|
|
||||||
- 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
|
# 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
|
||||||
mysql user: user # Required if "mysql root password" is empty, default is empty. The superuser for the specified database. Can use secrets, too
|
# mysql user: user # Required if "mysql root password" is empty, default is empty. The superuser for the specified database. Can use secrets, too
|
||||||
mysql password: pass
|
# mysql password: pass
|
||||||
- name: Wait for MySQL
|
- name: Wait for MySQL
|
||||||
run: |
|
run: |
|
||||||
sudo systemctl start mysql
|
sudo systemctl start mysql
|
||||||
sudo apt-get update
|
# sudo apt-get update
|
||||||
sudo apt-get install -y mysql-client
|
# sudo apt-get install -y mysql-client
|
||||||
docker ps -a
|
# docker ps -a
|
||||||
|
|
||||||
while ! mysqladmin ping --host=127.0.0.1 --port 3000 -uroot --password=root --silent < ./test/schema.sql; do
|
# while ! mysqladmin ping --host=127.0.0.1 --port 3000 -uroot --password=root --silent < ./test/schema.sql; do
|
||||||
sleep 1
|
# sleep 1
|
||||||
done
|
# done
|
||||||
docker container ls
|
# docker container ls
|
||||||
mysql -uroot -proot -e "show databases"
|
# mysql -uroot -proot -e "show databases"
|
||||||
- name: npm install, build, and test
|
- name: npm install, build, and test
|
||||||
run: |
|
run: |
|
||||||
npm install
|
npm install
|
||||||
|
|
Loading…
Reference in New Issue