代码拉取完成,页面将自动刷新
version: 2
jobs:
build:
docker:
- image: circleci/golang:1.12
- image: circleci/mysql:5.7
command: mysqld --lower_case_table_names=1 --character-set-server=utf8mb4 --collation-server=utf8mb4_bin --innodb-large-prefix=true --log-bin=on --server_id=111
environment:
- MYSQL_ALLOW_EMPTY_PASSWORD=true
working_directory: /go/src/github.com/hanchuanchuan/goInception
filters:
branches:
ignore: gh-pages
steps:
- run:
name: Install mysql-client
command: sudo apt install mysql-client
- checkout
- run:
name: Waiting for MySQL to be ready
command: |
for i in `seq 1 10`;
do
nc -z localhost 3306 && echo Success && exit 0
echo -n .
sleep 1
done
echo Failed waiting for MySQL && exit 1
- run:
name: mysql init
command: mysql -h 127.0.0.1 -u root -e "select version();create database if not exists test DEFAULT CHARACTER SET utf8;create database if not exists test_inc DEFAULT CHARACTER SET utf8;grant all on *.* to test@'127.0.0.1' identified by 'test';FLUSH PRIVILEGES;show databases;show variables like 'explicit_defaults_for_timestamp';"
- run: rm -f go.sum
- run: sudo chmod +x cmd/explaintest/run-tests.sh
- run:
name: "Build & Test"
command: make dev
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。