Skip to content

Commit

Permalink
chore: try to fix
Browse files Browse the repository at this point in the history
  • Loading branch information
SianLoong committed Dec 8, 2019
1 parent 8fc8c3d commit 5f25635
Showing 1 changed file with 24 additions and 11 deletions.
35 changes: 24 additions & 11 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,32 @@ jobs:
build:
name: Build
runs-on: ubuntu-latest
services:
mysql:
image: mysql:5.7
env:
MYSQL_ROOT_PASSWORD: abcd1234
MYSQL_DATABASE: sqlike
ports:
- 8888:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s
# services:
# mysql:
# image: mysql:8.0
# env:
# MYSQL_ROOT_PASSWORD: abcd1234
# MYSQL_DATABASE: sqlike
# ports:
# - 8888:3306
# options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s

steps:
- name: Shutdown Ubuntu MySQL (SUDO)
run: sudo service mysql stop # Shutdown the Default MySQL, "sudo" is necessary, please not remove it

- uses: mirromutth/mysql-action@v1.1
with:
# host port: 3800 # Optional, default value is 3306. The port of host
# container port: 3307 # Optional, default value is 3306. The port of container
character set server: "utf8" # Optional, default value is 'utf8mb4'. The '--character-set-server' option for mysqld
collation server: "utf8_general_ci" # Optional, default value is 'utf8mb4_general_ci'. The '--collation-server' option for mysqld
mysql version: "8.0" # Optional, default value is "latest". The version of the MySQL
mysql database: "sqlike" # Optional, default value is "test". The specified database which will be create
mysql root password: "abcd1234" # Required if "mysql user" is empty, default is empty. The root superuser password
# mysql user: "developer" # Required if "mysql root password" is empty, default is empty. The superuser for the specified database. Can use secrets, too
# mysql password: "" # Required if "mysql user" exists. The password for the "mysql user"

- name: Set up Go 1.13
uses: actions/setup-go@v1
with:
Expand All @@ -32,7 +47,5 @@ jobs:
dep ensure
fi
- run: mysql --port 8888 -u root -p abcd1234 -e 'CREATE DATABASE IF NOT EXISTS sqlike;'

- name: Test
run: go test ./...

0 comments on commit 5f25635

Please # to comment.