Skip to content

Commit

Permalink
feat: junit report
Browse files Browse the repository at this point in the history
  • Loading branch information
arifBurakDemiray committed Sep 22, 2023
1 parent 096c863 commit 1ae2ffa
Showing 1 changed file with 4 additions and 23 deletions.
27 changes: 4 additions & 23 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,28 +28,9 @@ jobs:
- name: Build and Test with Gradle
run: ./gradlew build

- name: Upload Test Results
if: ${{ always() }}
uses: actions/upload-artifact@v2
- name: Publish Test Report
uses: mikepenz/action-junit-report@v4
if: success() || failure() # always run even if the previous step fails
with:
name: test-results
path: sdk-java/build/reports/tests/

- name: Comment on PR with HTML Report Link
if: ${{ always() }}
uses: actions/github-script@v6
with:
script: |
const workspaceUrl = '${{ github.workspace }}/sdk-java/build/reports/tests/test/index.html';
const artifactLink = `<a href=${workspaceUrl} target="_blank">HTML Test Report</a>`;
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: `Test report is available here: ${artifactLink}`,
});
- name: Test github output
id: random-color-generator
run: echo "### Hello world! :rocket:" >> $GITHUB_STEP_SUMMARY
report_paths: 'sdk-java/build/test-results/test/TEST-*.xml'

0 comments on commit 1ae2ffa

Please sign in to comment.