Skip to content

Java Client Integration Tests #212

Java Client Integration Tests

Java Client Integration Tests #212

name: Java Client Integration Tests
on:
workflow_run:
workflows: ["Java Client Build"]
types:
- completed
# allow this workflow to update the status of the PR that triggered it
permissions:
statuses: write
checks: write
jobs:
integration-tests:
runs-on: ubuntu-latest
environment: integration-tests
if: ${{ github.event.workflow_run.conclusion == 'success' }}
name: Integration Tests
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 21
uses: actions/setup-java@v4
with:
distribution: "zulu"
java-version: "21"
- name: Run Integration tests
run: |
./gradlew test -PIntegrationTests
env:
CONDUCTOR_SERVER_URL: ${{ vars.SERVER_URL }}
CONDUCTOR_AUTH_KEY: ${{ secrets.AUTH_KEY }}
CONDUCTOR_AUTH_SECRET: ${{ secrets.AUTH_SECRET }}
- name: Publish Test Report
uses: mikepenz/action-junit-report@v6
if: always()
with:
report_paths: '**/build/test-results/test/TEST-*.xml'
- name: Update PR Status
if: always()
uses: actions/github-script@v7
with:
script: |
const { owner, repo } = context.repo;
const sha = context.payload.workflow_run.head_sha;
await github.rest.repos.createCommitStatus({
owner, repo, sha,
state: '${{ job.status }}' === 'success' ? 'success' : 'failure',
context: 'Integration Tests',
description: 'Integration tests ${{ job.status }}'
});