twenty/server/scripts/run-integration.sh
Jérémy M 157e5b9a2e
feat: implement e2e test for CompanyResolver (#944)
* feat: wip e2e server test

* feat: use github action postgres & use infra for local

* feat: company e2e test

* feat: add company e2e test for permissions

* Simplify server e2e test run

* Fix lint

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
2023-07-27 09:48:40 -07:00

18 lines
417 B
Bash
Executable File

#!/usr/bin/env bash
# src/run-integration.sh
DIR="$(cd "$(dirname "$0")" && pwd)"
source $DIR/setenv.sh
npx ts-node ./test/utils/check-db.ts
EXIT_CODE=$?
if [ $EXIT_CODE -ne 0 ]; then
echo '🟡 - Database is not initialized. Running migrations...'
npx prisma migrate reset --force && yarn prisma:generate
else
echo "🟢 - Database is already initialized."
fi
yarn jest --config ./test/jest-e2e.json