Skip to content

Commit

Permalink
Run integration tests in a different workflow which is triggered only…
Browse files Browse the repository at this point in the history
… after a successful build
  • Loading branch information
jmigueprieto committed Sep 17, 2024
1 parent 704917f commit ed85742
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 8 deletions.
10 changes: 2 additions & 8 deletions .github/workflows/java-client-v3-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
36 changes: 36 additions & 0 deletions .github/workflows/java-client-v3-integration-tests.yml
Original file line number Diff line number Diff line change
@@ -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'

0 comments on commit ed85742

Please sign in to comment.