Skip to content

Commit

Permalink
add rockhopper command for test
Browse files Browse the repository at this point in the history
  • Loading branch information
c9s committed May 3, 2022
1 parent 9b5ba37 commit 2371438
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ jobs:
redis-version:
- 6.2
env:
DB_DATABASE: bbgo
DB_USER: root
DB_PASSWORD: root
MYSQL_DATABASE: bbgo
MYSQL_USER: "root"
MYSQL_PASSWORD: "root"

steps:

Expand All @@ -36,7 +36,7 @@ jobs:
- name: Set up MySQL
run: |
sudo /etc/init.d/mysql start
mysql -e 'CREATE DATABASE ${{ env.DB_DATABASE }};' -u${{ env.DB_USER }} -p${{ env.DB_PASSWORD }}
mysql -e 'CREATE DATABASE ${{ env.MYSQL_DATABASE }};' -u${{ env.MYSQL_USER }} -p${{ env.MYSQL_PASSWORD }}
- name: Set up redis
uses: shogo82148/actions-setup-redis@v1
Expand All @@ -52,6 +52,10 @@ jobs:
- name: Install Migration Tool
run: go install github.com/c9s/rockhopper/cmd/[email protected]

- name: Test Migration SQL Files For MySQL
run: |
rockhopper --config rockhopper_mysql.yaml up
- name: Build
run: go build -v ./cmd/bbgo

Expand Down
2 changes: 1 addition & 1 deletion rockhopper_mysql.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ dialect: mysql
# dsn: "root:123123@unix(/opt/local/var/run/mysql57/mysqld.sock)/bbgo_dev?parseTime=true"

# tcp connection to mysql with password
# dsn: "root:123123@tcp(localhost:3306)/bbgo_dev?parseTime=true"
dsn: "root:root@tcp(localhost:3306)/bbgo?parseTime=true"

# tcp connection to mysql without password
# dsn: "root@tcp(localhost:3306)/bbgo_dev?parseTime=true"
Expand Down

0 comments on commit 2371438

Please sign in to comment.