-
Notifications
You must be signed in to change notification settings - Fork 0
31 lines (28 loc) · 872 Bytes
/
mysql.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
name: Build and Deploy
on:
pull_request:
branches: [master,dev-*]
push:
branches: [master,dev-*]
jobs:
test-host:
runs-on: ubuntu-latest
services:
mysql:
image: mysql:5.7
env:
MYSQL_ROOT_PASSWORD: password
MYSQL_DB: linkis_test
MYSQL_HOST: 127.0.0.1
MYSQL_PORT: 32574
MYSQL_USER: root
ports:
- 32574:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
steps:
- name: Verify MySQL connection from host
run: |
sudo apt-get install -y mysql-client
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -e "SHOW DATABASES"
echo "xxxx $MYSQL_ROOT_PASSWORD -- $MYSQL_DB"
echo "try to connect to linkis mysql $MYSQL_HOST:$MYSQL_PORT/$MYSQL_DB"