Skip to content

Commit

Permalink
Remove skipped assemblies test results prior to uploading as artifact (
Browse files Browse the repository at this point in the history
  • Loading branch information
Mpdreamz committed Jul 26, 2023
1 parent 4dd9b04 commit d265af0
Show file tree
Hide file tree
Showing 3 changed files with 232 additions and 216 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/test-linux-reporter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,9 @@ jobs:
steps:
- uses: elastic/apm-pipeline-library/.github/actions/test-report@current
with:
artifact: test-results-linux # artifact name
name: Linux Tests Summary # Name of the check run which will be created
path: "junit-*.xml" # Path to test results (inside artifact .zip)
reporter: java-junit # Format of test results
artifact: test-results-linux
name: Linux Tests Summary
path: "junit-*.xml"
reporter: java-junit
list-suites: 'failed'
list-tests: 'failed'
# output-to: 'step-summary'
23 changes: 20 additions & 3 deletions .github/workflows/test/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,28 @@ runs:
--verbosity minimal \
${{ inputs.filter != '' && format('--filter "{0}"', inputs.filter) || '' }} \
${{ inputs.framework != '' && format('-f {0}', inputs.framework) || '' }} \
--logger:"junit;LogFilePath=${GITHUB_WORKSPACE}/build/output/junit-${{ runner.os == 'Linux' && 'linux' || 'windows' }}-{framework}-{assembly}.xml;MethodFormat=Class;FailureBodyFormat=Verbose" \
--logger:"junit;LogFilePath=${GITHUB_WORKSPACE}/build/output/junit-${{ inputs.name }}-${{ runner.os == 'Linux' && 'linux' || 'windows' }}-{framework}-{assembly}.xml;MethodFormat=Class;FailureBodyFormat=Verbose" \
- name: Store test results
- name: "Test Report Clean: ${{ inputs.name }}-${{ runner.os == 'Linux' && 'linux' || 'windows' }}"
shell: bash
if: success() || failure()
run: find ./build/output/junit-* -exec grep -q '<testsuites />' '{}' \; -delete

- name: "Test Report Summary: ${{ inputs.name }}-${{ runner.os == 'Linux' && 'linux' || 'windows' }}"
uses: phoenix-actions/test-reporting@v12
if: success() || failure()
with:
name: " Tests: ${{ inputs.name }}-${{ runner.os == 'Linux' && 'linux' || 'windows' }}"
path: build/output/junit-*.xml
reporter: java-junit
output-to: 'step-summary'
fail-on-error: 'false'
list-suites: 'failed'
list-tests: 'failed'

- name: "Test Report Store: ${{ inputs.name }}-${{ runner.os == 'Linux' && 'linux' || 'windows' }}"
if: success() || failure()
uses: actions/upload-artifact@v3
with:
name: test-results-${{ runner.os == 'Linux' && 'linux' || 'windows' }}
name: "test-results-${{ runner.os == 'Linux' && 'linux' || 'windows' }}"
path: build/output/junit-*.xml
Loading

0 comments on commit d265af0

Please sign in to comment.