Skip to content

Commit

Permalink
Add integration tests to github workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
tomasol committed Oct 26, 2020
1 parent f38663e commit 0a76c8a
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@ dirname="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd ${dirname}

cd schellar
go test -v -short ./...

docker-compose -f ../docker-compose.test.yml up -d

trap 'docker-compose -f ../docker-compose.test.yml down' err exit

sleep 5
export BACKEND="postgres"
export POSTGRES_DATABASE_URL="host=127.0.0.1 port=6432 user=postgres password=postgres database=schellar_test"
export POSTGRES_MIGRATIONS_DIR=${dirname}/schellar/migrations
go test -count=1 ./...
RESULT=$?

docker-compose -f ../docker-compose.test.yml down
exit $RESULT
export POSTGRES_MIGRATIONS_DIR="$(pwd)/migrations"
go test -run Integration ./...

0 comments on commit 0a76c8a

Please sign in to comment.