File tree Expand file tree Collapse file tree 2 files changed +92
-0
lines changed Expand file tree Collapse file tree 2 files changed +92
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Github CI Build
2+
3+ on :
4+ push :
5+ branches : [ "master" ]
6+ pull_request :
7+ branches : [ "master" ]
8+
9+ concurrency :
10+ group : ci-${{ github.ref }}
11+ cancel-in-progress : true
12+
13+ jobs :
14+ event_file :
15+ name : " Upload Event File"
16+ runs-on : ubuntu-latest
17+ steps :
18+ - name : Upload
19+ uses : actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
20+ with :
21+ name : Event File
22+ path : ${{ github.event_path }}
23+ build :
24+ runs-on : ubuntu-latest
25+ steps :
26+ - uses : actions/checkout@v3
27+ - name : Set up JDK 17
28+ uses : actions/setup-java@v3
29+ with :
30+ java-version : ' 17'
31+ distribution : ' temurin'
32+ cache : maven
33+ - name : Set up Maven
34+ uses : stCarolas/setup-maven@d6af6abeda15e98926a57b5aa970a96bb37f97d1 # v5
35+ with :
36+ maven-version : 3.9.6
37+ - name : Felix SCR
38+ run : mvn -B -V -Dstyle.color=always --file scr/pom.xml clean verify
39+ - name : Upload Test Results
40+ if : always()
41+ uses : actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
42+ with :
43+ name : test-results
44+ if-no-files-found : warn
45+ path : |
46+ ${{ github.workspace }}/**/target/surefire-reports/*.xml
47+ ${{ github.workspace }}/**/target/failsafe-reports/*.xml
Original file line number Diff line number Diff line change 1+ name : Publish Unit Test Results
2+
3+ on :
4+ workflow_run :
5+ workflows : ["Github CI Build"]
6+ types :
7+ - completed
8+ permissions : {}
9+
10+ jobs :
11+ unit-test-results :
12+ name : Unit Test Results
13+ runs-on : ubuntu-latest
14+ if : github.event.workflow_run.conclusion != 'skipped'
15+
16+ permissions :
17+ checks : write
18+ pull-requests : write
19+ contents : read
20+ issues : read
21+ actions : read
22+
23+ steps :
24+ - name : Download and Extract Artifacts
25+ env :
26+ GITHUB_TOKEN : ${{secrets.GITHUB_TOKEN}}
27+ run : |
28+ mkdir -p artifacts && cd artifacts
29+
30+ artifacts_url=${{ github.event.workflow_run.artifacts_url }}
31+
32+ gh api "$artifacts_url" -q '.artifacts[] | [.name, .archive_download_url] | @tsv' | while read artifact
33+ do
34+ IFS=$'\t' read name url <<< "$artifact"
35+ gh api $url > "$name.zip"
36+ unzip -d "$name" "$name.zip"
37+ done
38+
39+ - name : Publish Test Results
40+ uses : EnricoMi/publish-unit-test-result-action@30eadd5010312f995f0d3b3cff7fe2984f69409e # v2.16.1
41+ with :
42+ commit : ${{ github.event.workflow_run.head_sha }}
43+ event_file : artifacts/Event File/event.json
44+ event_name : ${{ github.event.workflow_run.event }}
45+ junit_files : " artifacts/**/*.xml"
You can’t perform that action at this time.
0 commit comments