-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (58 loc) · 1.87 KB
/
Copy pathintegration-tests.yml
File metadata and controls
69 lines (58 loc) · 1.87 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
62
63
64
65
66
67
68
69
name: Integration Tests
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main, develop ]
jobs:
integration-tests:
runs-on: ubuntu-latest
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
steps:
- name: Updating runner
run: sudo apt-get update
- name: Setup JDK 21
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
- name: Checkout
uses: actions/checkout@v4
- name: Build and run integration tests
run: |
mvn -U clean verify -Pintegration-tests \
-DskipUnitTests=false \
-Dgroups=integration
- name: Upload test results
if: always()
uses: actions/upload-artifact@v4
with:
name: integration-test-results
path: |
**/target/failsafe-reports/
**/target/surefire-reports/
- name: Publish test report
if: always()
uses: EnricoMi/publish-unit-test-result-action@v2
with:
files: |
**/target/failsafe-reports/TEST-*.xml
**/target/surefire-reports/TEST-*.xml
check_name: Integration Test Results
- name: Comment PR with test results
if: github.event_name == 'pull_request' && always()
uses: actions/github-script@v7
with:
script: |
const fs = require('fs');
const path = require('path');
let testSummary = '## Integration Test Results\n\n';
testSummary += '✓ Integration tests completed\n\n';
testSummary += 'See artifacts for detailed test reports.';
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: testSummary
});