Skip to content

Commit

Permalink
new(action): upload raw testing report
Browse files Browse the repository at this point in the history
Signed-off-by: Luca Guerra <[email protected]>
  • Loading branch information
LucaGuerra authored and poiana committed Apr 11, 2024
1 parent f0b0c12 commit cd82bc6
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ inputs:
outputs:
report:
description: "Generated report xml"
value: ${{ steps.store-outputs.outputs.report }}
value: ${{ steps.run-tests.outputs.report }}

runs:
using: "composite"
Expand Down Expand Up @@ -74,6 +74,7 @@ runs:
${{ inputs.sudo }} apt install -y --no-install-recommends build-essential clang make llvm gcc dkms
- name: Run tests
id: run-tests
working-directory: ${{ github.action_path }}
env:
# fixme(leogr): this is a workaround for https://github.com/falcosecurity/falco/issues/2784
Expand All @@ -95,16 +96,18 @@ runs:
fi
fi
cat ./report.txt | go-junit-report -set-exit-code > report.xml
echo "report=$(realpath report.xml)" >> $GITHUB_OUTPUT
- name: Set output
id: store-outputs
shell: bash
run: |
echo "report=${{ github.action_path }}/report.xml" >> $GITHUB_OUTPUT
- name: Test Summary
if: always() # note: upload the report even if tests fail
uses: test-summary/action@62bc5c68de2a6a0d02039763b8c754569df99e3f
with:
paths: "${{ github.action_path }}/report.xml"
paths: ${{ steps.run-tests.outputs.report }}
show: ${{ inputs.show-all && 'all' || 'fail' }}

- name: Upload Test Summary
if: always() # note: upload the report even if tests fail
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
with:
name: falcosecurity-testing-report
path: ${{ steps.run-tests.outputs.report }}

0 comments on commit cd82bc6

Please sign in to comment.