fix: 更新mysql storage版本,解决create时主键冲突的问题 #8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Go package | |
on: [ push ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
# action文档: | |
# https://github.com/marketplace/actions/setup-mysql | |
- uses: mirromutth/[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 | |
# mysql version: '8.0' # Optional, default value is "latest". The version of the MySQL | |
mysql database: 'storage_lock_test' # Optional, default value is "test". The specified database which will be create | |
# 只在本地和CI测试中临时使用,就直接写死在这里了 | |
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_MYSQL_DSN: "root:UeGqAm8CxYGldMDLoNNt@tcp(127.0.0.1:3306)/storage_lock_test" |