Java Client v4 Integration Tests #74
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Java Client v4 Integration Tests | |
on: | |
workflow_run: | |
workflows: ["Java Client v4 Build"] | |
types: | |
- completed | |
# allow this workflow to update the status of the PR that triggered it | |
permissions: | |
statuses: write | |
jobs: | |
integrations-tests: | |
runs-on: ubuntu-latest | |
environment: integration-tests | |
if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
name: Java Client v4 Integration test | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.workflow_run.head_sha }} | |
repository: ${{ github.event.workflow_run.repository.full_name }} | |
- 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' | |
- name: Set PR Status to Failure | |
if: ${{ failure() }} | |
uses: actions/github-script@v6 | |
with: | |
script: | | |
const { owner, repo } = context.repo; | |
const sha = context.payload.workflow_run.head_sha; | |
await github.rest.repos.createCommitStatus({ | |
owner: owner, | |
repo: repo, | |
sha: sha, | |
state: 'failure', | |
context: 'Java Client v4 Integration Tests', | |
description: 'Integration tests failed.', | |
}); | |
- name: Set PR Status to Success | |
if: ${{ success() }} | |
uses: actions/github-script@v6 | |
with: | |
script: | | |
const { owner, repo } = context.repo; | |
const sha = context.payload.workflow_run.head_sha; | |
await github.rest.repos.createCommitStatus({ | |
owner: owner, | |
repo: repo, | |
sha: sha, | |
state: 'success', | |
context: 'Java Client v4 Integration Tests', | |
description: 'Integration tests succeeded.', | |
}); | |