Skip to content

refactor

refactor #1

Workflow file for this run

name: Go package
on: [ push ]
jobs:
build:
runs-on: ubuntu-latest
steps:
# action文档
# https://github.com/marketplace/actions/start-mariadb
- uses: getong/[email protected]
with:
host port: 3306 # Optional, default value is 3306. The port of host
container port: 3306 # Optional, default value is 3306. The port of container
character set server: 'utf8mb4' # Optional, default value is 'utf8mb4'. The '--character-set-server' option for mysqld
collation server: 'utf8mb4_general_ci' # Optional, default value is 'utf8mb4_general_ci'. The '--collation-server' option for mysqld
# mariadb version: '10.4.10' # Optional, default value is "latest". The version of the MariaDB
mysql database: 'storage_lock_test' # Optional, default value is "test". The specified database which will be create
# 这里就直接写死了
mysql root password: "UeGqAm8CxYGldMDLoNNt" # 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: ${{ secrets.DatabasePassword }} # Required if "mysql user" exists. The password for the "mysql user"
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.19'
- name: Test
run: go test -v ./...
env:
STORAGE_LOCK_MARIA_DSN: "root:UeGqAm8CxYGldMDLoNNt@tcp(127.0.0.1:3306)/storage_lock_test"