tests: run frontend build earlier
This commit is contained in:
@@ -74,14 +74,15 @@ echo "=> Ensure database"
|
||||
docker exec mysql-server mysql -uroot -ppassword -e "ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY 'password';"
|
||||
docker exec mysql-server mysql -uroot -ppassword -e "CREATE DATABASE IF NOT EXISTS box"
|
||||
|
||||
echo "=> Run database migrations"
|
||||
BOX_ENV=test DATABASE_URL=mysql://root:password@${MYSQL_IP}/box node_modules/.bin/db-migrate up
|
||||
|
||||
# do this before migrations! box code requires oidc files to exist which are imported in migrations
|
||||
echo "=> Ensure dist/ exists"
|
||||
if [[ ! -d "dashboard/dist" ]]; then
|
||||
(cd dashboard && npm run build)
|
||||
fi
|
||||
|
||||
echo "=> Run database migrations"
|
||||
BOX_ENV=test DATABASE_URL=mysql://root:password@${MYSQL_IP}/box node_modules/.bin/db-migrate up
|
||||
|
||||
TESTS=${DEFAULT_TESTS}
|
||||
if [[ $# -gt 0 ]]; then
|
||||
TESTS="$*"
|
||||
|
||||
Reference in New Issue
Block a user