Skip to content

Commit 507a77c

Browse files
authored
Merge pull request #1 from barisgit/feature/upload-schematic-boms
2 parents 23b4299 + f7c1a19 commit 507a77c

File tree

10 files changed

+2956
-643
lines changed

10 files changed

+2956
-643
lines changed

Makefile renamed to makefile

Lines changed: 27 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,14 @@
11
# PartDB Makefile for Test Environment Management
22

3-
.PHONY: help test-setup test-clean test-db-create test-db-migrate test-cache-clear test-fixtures test-run dev-setup dev-clean dev-db-create dev-db-migrate dev-cache-clear dev-warmup dev-reset
3+
.PHONY: help test-setup test-clean test-db-create test-db-migrate test-cache-clear test-fixtures test-run dev-setup dev-clean dev-db-create dev-db-migrate dev-cache-clear dev-warmup dev-reset deps-install
44

55
# Default target
66
help:
77
@echo "PartDB Test Environment Management"
88
@echo "=================================="
99
@echo ""
1010
@echo "Available targets:"
11-
@echo " test-setup - Complete test environment setup (clean, create DB, migrate, load fixtures)"
12-
@echo " test-clean - Clean test cache and database files"
13-
@echo " test-db-create - Create test database (if not exists)"
14-
@echo " test-db-migrate - Run database migrations for test environment"
15-
@echo " test-cache-clear- Clear test cache"
16-
@echo " test-fixtures - Load test fixtures"
17-
@echo " test-run - Run PHPUnit tests"
11+
@echo " deps-install - Install PHP dependencies with unlimited memory"
1812
@echo ""
1913
@echo "Development Environment:"
2014
@echo " dev-setup - Complete development environment setup (clean, create DB, migrate, warmup)"
@@ -25,10 +19,25 @@ help:
2519
@echo " dev-warmup - Warm up development cache"
2620
@echo " dev-reset - Quick development reset (clean + migrate)"
2721
@echo ""
22+
@echo "Test Environment:"
23+
@echo " test-setup - Complete test environment setup (clean, create DB, migrate, load fixtures)"
24+
@echo " test-clean - Clean test cache and database files"
25+
@echo " test-db-create - Create test database (if not exists)"
26+
@echo " test-db-migrate - Run database migrations for test environment"
27+
@echo " test-cache-clear- Clear test cache"
28+
@echo " test-fixtures - Load test fixtures"
29+
@echo " test-run - Run PHPUnit tests"
30+
@echo ""
2831
@echo " help - Show this help message"
2932

33+
# Install PHP dependencies with unlimited memory
34+
deps-install:
35+
@echo "📦 Installing PHP dependencies..."
36+
COMPOSER_MEMORY_LIMIT=-1 composer install
37+
@echo "✅ Dependencies installed"
38+
3039
# Complete test environment setup
31-
test-setup: test-clean test-db-create test-db-migrate test-fixtures
40+
test-setup: deps-install test-clean test-db-create test-db-migrate test-fixtures
3241
@echo "✅ Test environment setup complete!"
3342

3443
# Clean test environment
@@ -46,7 +55,7 @@ test-db-create:
4655
# Run database migrations for test environment
4756
test-db-migrate:
4857
@echo "🔄 Running database migrations..."
49-
COMPOSER_MEMORY_LIMIT=-1 php bin/console doctrine:migrations:migrate -n --env test
58+
php -d memory_limit=1G bin/console doctrine:migrations:migrate -n --env test
5059

5160
# Clear test cache
5261
test-cache-clear:
@@ -64,12 +73,16 @@ test-run:
6473
@echo "🧪 Running tests..."
6574
php bin/phpunit
6675

76+
test-typecheck:
77+
@echo "🧪 Running type checks..."
78+
COMPOSER_MEMORY_LIMIT=-1 composer phpstan
79+
6780
# Quick test reset (clean + migrate + fixtures, skip DB creation)
6881
test-reset: test-cache-clear test-db-migrate test-fixtures
6982
@echo "✅ Test environment reset complete!"
7083

7184
# Development helpers
72-
dev-setup: dev-clean dev-db-create dev-db-migrate dev-warmup
85+
dev-setup: deps-install dev-clean dev-db-create dev-db-migrate dev-warmup
7386
@echo "✅ Development environment setup complete!"
7487

7588
dev-clean:
@@ -84,16 +97,16 @@ dev-db-create:
8497

8598
dev-db-migrate:
8699
@echo "🔄 Running database migrations..."
87-
COMPOSER_MEMORY_LIMIT=-1 php bin/console doctrine:migrations:migrate -n --env dev
100+
php -d memory_limit=1G bin/console doctrine:migrations:migrate -n --env dev
88101

89102
dev-cache-clear:
90103
@echo "🗑️ Clearing development cache..."
91-
rm -rf var/cache/dev
104+
php -d memory_limit=1G bin/console cache:clear --env dev -n
92105
@echo "✅ Development cache cleared"
93106

94107
dev-warmup:
95108
@echo "🔥 Warming up development cache..."
96-
COMPOSER_MEMORY_LIMIT=-1 php bin/console cache:warmup --env dev -n --memory-limit=1G
109+
php -d memory_limit=1G bin/console cache:warmup --env dev -n
97110

98111
dev-reset: dev-cache-clear dev-db-migrate
99112
@echo "✅ Development environment reset complete!"

0 commit comments

Comments
 (0)