Skip to content

Commit 889120a

Browse files
committed
test: add cleanup target
1 parent 396625c commit 889120a

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

Makefile

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ help:
1818
@echo " setup-supabase - Set up Supabase for testing"
1919
@echo " test - Run tests"
2020
@echo " pg_tap - Run pg_tap tests"
21+
@echo " cleanup - Remove files created during testing"
2122

2223
# Reset database
2324
.PHONY: reset-database
@@ -77,7 +78,14 @@ benchmark:
7778
@echo "Running benchmark..."
7879
PGPASSWORD=$(PG_PASSWORD) psql -h $(PG_HOST) -p $(PG_PORT) -U $(PG_USER) -d $(PG_DB) -v ON_ERROR_STOP=1 -f $(TEST_DIR)/bench.sql
7980

81+
# Clean up files created during testing
82+
.PHONY: cleanup
83+
cleanup:
84+
@echo "Cleaning up test files..."
85+
@rm -f create_schema.sql create_test_accounts.sql
86+
@rm -f $(TEST_DIR)/.env.test
87+
8088
# Run tests with coverage (including Supabase setup and migrations)
8189
.PHONY: test
82-
test: setup-supabase apply-integration-test-migrations pg_tap
90+
test: setup-supabase apply-integration-test-migrations pg_tap cleanup
8391
@echo "Running tests..."

0 commit comments

Comments
 (0)