Skip to content

Commit

Permalink
fix : Splitting the tests for services using jdk11 and jdk21
Browse files Browse the repository at this point in the history
  • Loading branch information
aimansharief committed Oct 28, 2024
1 parent 5b5f7e7 commit 0891523
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 10 deletions.
33 changes: 30 additions & 3 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,37 @@ jobs:
- name: Check disk space after build
run: df -h

test:
test-v1:
needs: [build-java-11]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 11
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'adopt'
cache: 'maven'
- name: Install Docker Compose
run: |
curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
docker-compose --version
## debug step
# - name: Setup upterm session
# uses: lhotari/action-upterm@v1
# with:
# ## limits ssh access and adds the ssh public key for the user which triggered the workflow
# limit-access-to-actor: true

- name: Run V1 tests
run: make test-v1

test-v2:
needs: [build-java-21]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
Expand All @@ -114,5 +140,6 @@ jobs:
# ## limits ssh access and adds the ssh public key for the user which triggered the workflow
# limit-access-to-actor: true

- name: Run tests
run: make test
- name: Run V2 tests
run: make test-v2

18 changes: 11 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,22 +39,26 @@ java/registry/target/registry.jar: $(SOURCES)
sh configure-dependencies.sh
cd java && ./mvnw clean install

test: build
test-v1: build
@docker-compose -f docker-compose-v1.yml down
@sudo rm -rf db-data* es-data* || echo "no permission to delete"
# test with distributed definition manager and native search
@docker-compose -f docker-compose-v1.yml --env-file test_environments/test_with_distributedDefManager_nativeSearch.env up -d db keycloak registry certificate-signer certificate-api redis
@echo "Starting the test" && sh build/wait_for_port.sh 8080
@echo "Starting the test" && sh build/wait_for_port.sh 8081
@echo "Starting the native search test"
@sh build/wait_for_port.sh 8080
@sh build/wait_for_port.sh 8081
@docker-compose -f docker-compose-v1.yml ps
@curl -v http://localhost:8081/health
@cd java/apitest && ../mvnw -Pe2e test
@docker-compose -f docker-compose-v1.yml down
@sudo rm -rf db-data-1 || echo "no permission to delete"
# test with kafka(async), events, notifications,

test-v2: build
@docker-compose -f docker-compose-v1.yml down
@sudo rm -rf db-data* es-data* || echo "no permission to delete"
@docker-compose -f docker-compose-v1.yml --env-file test_environments/test_with_asyncCreate_events_notifications.env up -d db es clickhouse redis keycloak registry certificate-signer certificate-api kafka zookeeper notification-ms metrics
@echo "Starting the test" && sh build/wait_for_port.sh 8080
@echo "Starting the test" && sh build/wait_for_port.sh 8081
@echo "Starting the async events test"
@sh build/wait_for_port.sh 8080
@sh build/wait_for_port.sh 8081
@docker-compose -f docker-compose-v1.yml ps
@curl -v http://localhost:8081/health
@cd java/apitest && MODE=async ../mvnw -Pe2e test
Expand Down

0 comments on commit 0891523

Please sign in to comment.