forked from tiangolo/full-stack
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.sh
More file actions
18 lines (13 loc) · 810 Bytes
/
test.sh
File metadata and controls
18 lines (13 loc) · 810 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#! /usr/bin/env bash
rm -rf ./testing-project
cookiecutter --config-file ./testing-config.yml --no-input -f ./
cd ./testing-project
DOMAIN=backend docker-compose -f docker-compose.yml -f docker-compose.build.yml -f docker-compose.test.yml config > docker-stack.yml
docker-compose -f docker-stack.yml build
docker-compose -f docker-stack.yml down -v --remove-orphans # Remove possibly previous broken stacks left hanging after an error
docker-compose -f docker-stack.yml up -d
sleep 20; # Give some time for the DB and prestart script to finish
docker-compose -f docker-stack.yml exec -T backend bash -c 'alembic revision --autogenerate -m "Testing" && alembic upgrade head'
docker-compose -f docker-stack.yml exec -T backend-tests pytest
docker-compose -f docker-stack.yml down -v --remove-orphans
cd ../