Skip to content

Java Client v4 Integration Tests #104

Java Client v4 Integration Tests

Java Client v4 Integration Tests #104

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.',
});