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 b111daf
Show file tree
Hide file tree
Showing 2 changed files with 18 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
16 changes: 16 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,23 @@ 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
volumes:
- .:/app:delegated
- test_gradle_cache:/app/.gradle
depends_on:
- shared_mysql
- shared_rabbitmq
- backoffice_elasticsearch
tty: true

volumes:
backoffice_backend_gradle_cache:
backoffice_frontend_gradle_cache:
mooc_backend_gradle_cache:
test_gradle_cache:

0 comments on commit b111daf

Please sign in to comment.