Skip to content

Commit

Permalink
ci: add test server to run the tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rgomezcasas committed Nov 13, 2023
1 parent be7cd1a commit f57df7d
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ build:
@./gradlew build --warning-mode all

lint:
@docker exec codely-java_ddd_example-mooc_backend_server ./gradlew spotlessCheck
@docker exec codely-java_ddd_example-test_server ./gradlew spotlessCheck

run-tests:
@./gradlew test --warning-mode all

test:
@docker exec codely-java_ddd_example-mooc_backend_server ./gradlew test --warning-mode all
@docker exec codely-java_ddd_example-test_server ./gradlew test --warning-mode all

run:
@./gradlew :run
Expand Down
17 changes: 17 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,24 @@ services:
- backoffice_elasticsearch
command: ["./gradlew", "bootRun", "--args", "mooc_backend server"]

test_server_java:
container_name: codely-java_ddd_example-test_server
build:
context: .
dockerfile: Dockerfile
restart: unless-stopped
ports:
- "8030:8030"
volumes:
- .:/app:delegated
- test_gradle_cache:/app/.gradle
depends_on:
- shared_mysql
- shared_rabbitmq
- backoffice_elasticsearch

volumes:
backoffice_backend_gradle_cache:
backoffice_frontend_gradle_cache:
mooc_backend_gradle_cache:
test_gradle_cache:

0 comments on commit f57df7d

Please sign in to comment.