From ed85742abc6cc28b6d0030ad786f26e4e9fab2ec Mon Sep 17 00:00:00 2001 From: Miguel Prieto Date: Tue, 17 Sep 2024 17:14:06 -0400 Subject: [PATCH] Run integration tests in a different workflow which is triggered only after a successful build --- .github/workflows/java-client-v3-build.yml | 10 ++---- .../java-client-v3-integration-tests.yml | 36 +++++++++++++++++++ 2 files changed, 38 insertions(+), 8 deletions(-) create mode 100644 .github/workflows/java-client-v3-integration-tests.yml diff --git a/.github/workflows/java-client-v3-build.yml b/.github/workflows/java-client-v3-build.yml index 5ff568d05..a7830df5b 100644 --- a/.github/workflows/java-client-v3-build.yml +++ b/.github/workflows/java-client-v3-build.yml @@ -25,16 +25,10 @@ jobs: with: distribution: "zulu" java-version: "17" - - name: Build and run tests + - name: Build run: | - hostname - echo "host is $HOSTNAME" cd conductor-clients/java/conductor-java-sdk - ./gradlew clean build - env: - CONDUCTOR_SERVER_URL: ${{ secrets.CONDUCTOR_SERVER_URL }} - CONDUCTOR_SERVER_AUTH_KEY: ${{ secrets.CONDUCTOR_SERVER_AUTH_KEY }} - CONDUCTOR_SERVER_AUTH_SECRET: ${{ secrets.CONDUCTOR_SERVER_AUTH_SECRET }} + ./gradlew clean build -x :tests:build - name: Publish Test Report uses: mikepenz/action-junit-report@v3 if: always() diff --git a/.github/workflows/java-client-v3-integration-tests.yml b/.github/workflows/java-client-v3-integration-tests.yml new file mode 100644 index 000000000..7e07d1459 --- /dev/null +++ b/.github/workflows/java-client-v3-integration-tests.yml @@ -0,0 +1,36 @@ +name: Java Client v3 Integration Tests + +on: + workflow_run: + workflows: ["Java Client v3 Build"] + types: + - completed + +jobs: + integrations-tests: + runs-on: ubuntu-latest + environment: integration-tests + if: ${{ github.event.workflow_run.conclusion == 'success' }} + name: Java Client v3 Integration test + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Set up Zulu JDK 17 + uses: actions/setup-java@v3 + with: + distribution: "zulu" + java-version: "17" + - name: Run Integration tests + run: | + cd conductor-clients/java/conductor-java-sdk + ./gradlew -p tests test + env: + CONDUCTOR_SERVER_URL: ${{ secrets.CONDUCTOR_SERVER_URL }} + CONDUCTOR_SERVER_AUTH_KEY: ${{ secrets.CONDUCTOR_SERVER_AUTH_KEY }} + CONDUCTOR_SERVER_AUTH_SECRET: ${{ secrets.CONDUCTOR_SERVER_AUTH_SECRET }} + - name: Publish Test Report + uses: mikepenz/action-junit-report@v3 + if: always() + with: + report_paths: 'conductor-clients/java/**/build/test-results/test/TEST-*.xml' +