File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -115,7 +115,7 @@ jobs:
115115 - name : Set up Go
116116 uses : actions/setup-go@v5
117117 with :
118- go-version : ' 1.21 '
118+ go-version-file : ' go.mod '
119119
120120 - name : Download dependencies
121121 run : go mod download
@@ -124,7 +124,7 @@ jobs:
124124 run : sleep 15
125125
126126 - name : Run Integration Tests
127- run : go run -tags=integration test/integration_main .go
127+ run : go run -tags=integration test/integration/main .go
128128 env :
129129 PG_SOURCE_DSN : " postgres://testuser:testpass@localhost:5432/sourcedb?sslmode=disable"
130130 PG_TARGET_DSN : " postgres://testuser:testpass@localhost:5433/targetdb?sslmode=disable"
Original file line number Diff line number Diff line change @@ -41,11 +41,11 @@ test-integration:
4141 echo " docker-compose not found. Skipping integration tests." ; \
4242 exit 0; \
4343 fi
44- ./run_integration_tests.sh
44+ ./scripts/ run_integration_tests.sh
4545
4646test-e2e :
4747 @echo " Running E2E tests..."
48- go run -tags=e2e test/e2e_test .go
48+ go run -tags=e2e test/e2e/main .go
4949
5050test-coverage :
5151 go test -race -coverprofile=coverage.out ./...
Original file line number Diff line number Diff line change @@ -144,7 +144,7 @@ go test ./...
144144
145145# Integration tests (requires Docker)
146146docker compose -f docker-compose.test.yml up -d
147- go run -tags=integration test/integration_main .go
147+ go run -tags=integration test/integration/main .go
148148docker compose -f docker-compose.test.yml down
149149```
150150
Original file line number Diff line number Diff line change 1717
1818# Start containers
1919echo " Starting test databases..."
20- docker-compose -f docker-compose.test.yml up -d
20+ # Ensure we are in project root for docker-compose file
21+ docker-compose --project-directory . -f docker-compose.test.yml up -d
2122
2223# Wait for databases to be ready
2324echo " Waiting for PostgreSQL and MySQL to be ready..."
2425sleep 20 # MySQL takes longer to boot up
2526
26- # Run integration tests locally (assuming go is installed properly)
27+ # Run integration tests locally
2728echo " Running integration tests..."
28- go test -tags=integration ./ test/... -v
29+ go run -tags=integration test/integration/main.go
2930
3031# Stop containers
3132echo " Stopping test databases..."
32- docker-compose -f docker-compose.test.yml down
33+ docker-compose --project-directory . - f docker-compose.test.yml down
3334
3435echo " === Integration tests complete ==="
You can’t perform that action at this time.
0 commit comments