Skip to content

Commit

Permalink
add functional test results to artifacts (radius-project#7583)
Browse files Browse the repository at this point in the history
# Description
Add functional test results as an artifact so we can download it. 
Currently, rerun erases a functional test run's result and there is no
easy way to download/process the results.

Sample artifact that is produced after adding these changes is in the
summary of [Functional tests · radius-project/radius@65bed3d
(github.com)](https://github.com/radius-project/radius/actions/runs/9023474283)

Name of the artifact is functional_test_results

## Type of change

- This pull request adds or changes features of Radius and has an
approved issue (issue link required).

<!--

Please update the following to link the associated issue. This is
required for some kinds of changes (see above).

-->

Fixes: radius-project#6727

---------

Signed-off-by: nithyatsu <[email protected]>
  • Loading branch information
nithyatsu authored May 16, 2024
1 parent 427eed2 commit a1cb280
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/actions/process-test-results/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ runs:
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
check_name: ${{ inputs.test_group_name }}
files: |
${{ inputs.result_directory }}/processed/*.xml
- name: 'Upload ${{ inputs.test_group_name }} Results'
Expand Down
11 changes: 11 additions & 0 deletions .github/workflows/functional-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -546,6 +546,8 @@ jobs:
run: |
# Ensure rad cli is in path before running tests.
export PATH=$GITHUB_WORKSPACE/bin:$PATH
# Make directory to capture functional test results
mkdir -p ./dist/functional_test
cd $GITHUB_WORKSPACE
which rad || { echo "cannot find rad"; exit 1; }
Expand Down Expand Up @@ -575,6 +577,15 @@ jobs:
BICEP_RECIPE_REGISTRY: ${{ env.BICEP_RECIPE_REGISTRY }}
BICEP_RECIPE_TAG_VERSION: ${{ env.BICEP_RECIPE_TAG_VERSION }}
GH_TOKEN: ${{ steps.get_installation_token.outputs.token }}
GOTESTSUM_OPTS: '--junitfile ./dist/functional_test/results.xml'
- name: Process Functional Test Results
uses: ./.github/actions/process-test-results
# In case of failure, upload functional_test_results to artifacts so that they are not erased by subsequent runs.
if: failure() && github.repository == 'radius-project/radius'
with:
test_group_name: 'Functional Tests - ${{ matrix.name }}'
artifact_name: 'functional_test_results_${{ matrix.name }}'
result_directory: 'dist/functional_test/'
- uses: azure/setup-kubectl@v4
if: always()
with:
Expand Down

0 comments on commit a1cb280

Please sign in to comment.