You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- name: Set up JDK 8
uses: actions/setup-java@v4
with:
java-version: '8'
distribution: 'temurin'
- name: Cache local Maven repository
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Build with Maven
if: ${{ github.ref_name != 'release/ready' }}
run: mvn -B package --file pom.xml
- name: Publish the Test reports in Junit xml format
id: publish-test-reports
uses: actions/upload-artifact@v4
if: always()
with:
name: 'maven-test-reports'
path: '*/target/surefire-reports/*.xml'
analyze-test-results:
needs: build
runs-on: default
steps:
- uses: actions/download-artifact@v4
with:
name: 'maven-test-reports'
- name: Display structure of downloaded files
run: ls -R
- name: Analyse Test Results
uses: dorny/test-reporter@v1
if: success() # Run only if the previous step was successful
with:
name: Junit Tests # Name of the check run which will be created
path: '*.xml' # Path to test results
reporter: java-junit
The text was updated successfully, but these errors were encountered:
Describe the bug
Hi Dorny I'm struggling with Java Unit Test reporting, I have tried multiple options. Below is my github action yaml. I hope you can help
jobs:
build:
runs-on: ubuntu
name: CI Build
steps:
- name: Checkout code
uses: actions/checkout@v4
analyze-test-results:
needs: build
runs-on: default
steps:
- uses: actions/download-artifact@v4
with:
name: 'maven-test-reports'
- name: Display structure of downloaded files
run: ls -R
- name: Analyse Test Results
uses: dorny/test-reporter@v1
if: success() # Run only if the previous step was successful
with:
name: Junit Tests # Name of the check run which will be created
path: '*.xml' # Path to test results
reporter: java-junit
The text was updated successfully, but these errors were encountered: