add script for testing mysql migrations

This commit is contained in:
c9s 2021-02-15 20:45:32 +08:00
parent 7d243e6026
commit 777d673b14
3 changed files with 9 additions and 1 deletions

View File

@ -20,4 +20,5 @@ before_script:
script:
- bash scripts/test-sqlite3-migrations.sh
- bash scripts/test-mysql-migrations.sh
- go test -v ./pkg/...

View File

@ -0,0 +1,4 @@
#!/bin/bash
set -e
rockhopper --config rockhopper_mysql.yaml up
rockhopper --config rockhopper_mysql.yaml down --to 1

View File

@ -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