Repository navigation
63 lines (56 loc) · 1.96 KB
/
Copy pathintegration-tests.yml
File metadata and controls
63 lines (56 loc) · 1.96 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
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
concurrency:
group: ${{ github.workflow }}-${{ github.event.workflow_run.head_branch }}
cancel-in-progress: true
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@v6
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@v5
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@v8
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',
target_url: `${context.serverUrl}/${owner}/${repo}/actions/runs/${context.runId}`,
description: 'Integration tests ${{ job.status }}'
});