Simplify / test_local.sh
Rsr2425's picture
Added some container cleanup code
89425e7
raw
history blame contribute delete
943 Bytes
#!/bin/bash
# Colors and formatting
BLUE='\033[0;34m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
NC='\033[0m' # No Color
BOLD='\033[1m'
DIVIDER="=================================================================="
echo -e "\n${BLUE}${DIVIDER}"
echo -e "${BOLD}πŸ”¨ BUILD PHASE"
echo -e "${BLUE}${DIVIDER}${NC}"
# Build test image
echo -e "${YELLOW}Building test image...${NC}"
docker build -t simplify-test -f Dockerfile.test .
echo -e "\n${BLUE}${DIVIDER}"
echo -e "${BOLD}πŸ§ͺ FRONTEND TESTS"
echo -e "${BLUE}${DIVIDER}${NC}"
# Run frontend tests
echo -e "${YELLOW}Running frontend tests...${NC}"
docker run --rm simplify-test npm test --prefix frontend
echo -e "\n${BLUE}${DIVIDER}"
echo -e "${BOLD}🐍 BACKEND TESTS"
echo -e "${BLUE}${DIVIDER}${NC}"
# Run backend tests
echo -e "${YELLOW}Running backend tests...${NC}"
docker run --rm --env-file .env simplify-test pytest backend/tests
echo -e "\n${GREEN}✨ Testing complete!${NC}\n"