Skip to content

Commit

Permalink
add script for testing mysql migrations
Browse files Browse the repository at this point in the history
  • Loading branch information
c9s committed Feb 15, 2021
1 parent 7d243e6 commit 777d673
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,5 @@ before_script:

script:
- bash scripts/test-sqlite3-migrations.sh
- bash scripts/test-mysql-migrations.sh
- go test -v ./pkg/...
4 changes: 4 additions & 0 deletions scripts/test-mysql-migrations.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash
set -e
rockhopper --config rockhopper_mysql.yaml up
rockhopper --config rockhopper_mysql.yaml down --to 1
5 changes: 4 additions & 1 deletion scripts/test-sqlite3-migrations.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
#!/bin/bash
rm -fv bbgo.sqlite3 && rockhopper --config rockhopper_sqlite.yaml up && rockhopper --config rockhopper_sqlite.yaml down --to 1
set -e
rm -fv bbgo.sqlite3
rockhopper --config rockhopper_sqlite.yaml up
rockhopper --config rockhopper_sqlite.yaml down --to 1

0 comments on commit 777d673

Please sign in to comment.