Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/actions/install-ci-run/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,19 @@ runs:
tools/run_install_ci.py "${args[@]}"
- name: Upload JUnit XML report
if: always()
id: upload-junit-report
uses: actions/upload-artifact@v7
with:
name: install-ci-junit-${{ runner.arch }}
path: ${{ github.workspace }}/results/results.xml
if-no-files-found: ignore
retention-days: 7

- name: Upload omni-github test results
if: always()
uses: ./.github/actions/upload-omni-github-test-results
with:
junit-file: ${{ github.workspace }}/results/results.xml
junit-log-url: ${{ steps.upload-junit-report.outputs.artifact-url }}
artifact-prefix: pytest-results-${{ github.job }}-${{ runner.arch }}
test-type: installation-e2e
5 changes: 5 additions & 0 deletions .github/actions/run-package-tests/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ inputs:
description: 'Space-separated pip packages to install inside the Docker container before pytest starts'
default: ''
required: false
omni-github-test-type:
description: 'Test type stored on each uploaded omni-github test row'
default: 'pytest'
required: false
container-name:
description: 'Docker container name prefix (run-id is appended automatically)'
required: true
Expand Down Expand Up @@ -150,6 +154,7 @@ runs:
include-files: ${{ inputs.include-files }}
volume-mount-source: ${{ github.workspace }}
extra-pip-packages: ${{ inputs.extra-pip-packages }}
omni-github-test-type: ${{ inputs.omni-github-test-type }}

- name: Check Test Results
if: always()
Expand Down
16 changes: 16 additions & 0 deletions .github/actions/run-tests/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ inputs:
description: 'Space-separated pip packages to install inside the Docker container before pytest starts'
default: ''
required: false
omni-github-test-type:
description: 'Test type stored on each uploaded omni-github test row'
default: 'pytest'
required: false

runs:
using: composite
Expand Down Expand Up @@ -421,6 +425,7 @@ runs:
- name: Upload comparison images
if: always()
id : upload-comparison-images
uses: actions/upload-artifact@v7
with:
name: comparison-images-${{ inputs.container-name }}
Expand All @@ -430,13 +435,24 @@ runs:

- name: Upload JUnit XML report
if: always()
id: upload-junit-report
uses: actions/upload-artifact@v7
with:
name: junit-${{ inputs.container-name }}
path: ${{ inputs.reports-dir }}/${{ inputs.result-file }}
if-no-files-found: ignore
retention-days: 7

- name: Upload omni-github test results
if: always()
uses: ./.github/actions/upload-omni-github-test-results
with:
junit-file: ${{ inputs.reports-dir }}/${{ inputs.result-file }}
junit-log-url: ${{ steps.upload-junit-report.outputs.artifact-url }}
comparison-images-url: ${{ steps.upload-comparison-images.outputs.artifact-url }}
artifact-prefix: pytest-results-${{ github.job }}-${{ inputs.container-name }}
test-type: ${{ inputs.omni-github-test-type }}

- name: Clean up Docker container
if: always() && !cancelled()
shell: bash
Expand Down
107 changes: 107 additions & 0 deletions .github/actions/upload-omni-github-test-results/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
# Copyright (c) 2022-2026, The Isaac Lab Project Developers (https://github.com/isaac-sim/IsaacLab/blob/main/CONTRIBUTORS.md).
# All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause

name: 'Upload omni-github test results'
description: >
Converts a JUnit XML report into the omni-github test-result artifact
contract and uploads it with the current GitHub repository identity.
inputs:
junit-file:
description: 'Path to the JUnit XML report to convert'
required: true
junit-log-url:
description: 'URL of the uploaded JUnit XML artifact'
default: ''
required: false
comparison-images-url:
description: 'URL of the uploaded comparison images artifact'
default: ''
required: false
artifact-prefix:
description: 'Artifact name prefix'
required: true
test-tool-id:
description: 'Identifier for the test runner that produced the JUnit report'
default: 'pytest'
required: false
test-type:
description: >-
Suite category stored on each uploaded omni-github test row, such as
training-e2e, rendering-correctness, pytest, etc.
default: 'pytest'
required: false
retention-days:
description: 'GitHub artifact retention in days'
default: '7'
required: false

runs:
using: composite
steps:
- name: Convert JUnit XML to omni-github results
id: convert
shell: bash
env:
ARTIFACT_PREFIX: ${{ inputs.artifact-prefix }}
JUNIT_FILE: ${{ inputs.junit-file }}
TEST_TOOL_ID: ${{ inputs.test-tool-id }}
TEST_TYPE: ${{ inputs.test-type }}
run: |
set -euo pipefail
if [ ! -f "$JUNIT_FILE" ]; then
echo "::warning::Skipping omni-github upload because JUnit report was not found: $JUNIT_FILE"
echo "upload=false" >> "$GITHUB_OUTPUT"
exit 0
fi
case "${RUNNER_OS:-unknown}-${RUNNER_ARCH:-unknown}" in
Linux-X64) app_platform="linux-x86_64" ;;
Linux-ARM64) app_platform="linux-aarch64" ;;
Windows-X64) app_platform="windows-x86_64" ;;
Windows-ARM64) app_platform="windows-aarch64" ;;
macOS-X64) app_platform="macos-x86_64" ;;
macOS-ARM64) app_platform="macos-aarch64" ;;
*) app_platform="$(printf '%s-%s' "${RUNNER_OS:-unknown}" "${RUNNER_ARCH:-unknown}" | tr '[:upper:]' '[:lower:]')" ;;
esac
run_attempt="${GITHUB_RUN_ATTEMPT:-1}"
retries=0
# Run attempt > 1 means this job is a re-run, so adjust the retries count accordingly
[[ "$run_attempt" =~ ^[1-9][0-9]*$ ]] && retries=$((run_attempt - 1))
# Base directory for the artifact, which will be uploaded to GitHub
artifact_dir="${RUNNER_TEMP}/omni-github-test-results/${ARTIFACT_PREFIX}-${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}-${GITHUB_JOB}"
rm -rf "$artifact_dir"
mkdir -p "$artifact_dir"
python3 "$GITHUB_ACTION_PATH/junit_to_omni_github_results.py" \
--junit-file "$JUNIT_FILE" \
--output-dir "$artifact_dir" \
--test-tool-id "$TEST_TOOL_ID" \
--test-type "$TEST_TYPE" \
--app-platform "$app_platform" \
--app-config "${GITHUB_JOB:-github-job}" \
--group-name "${GITHUB_WORKFLOW:-github-workflow} / ${GITHUB_JOB:-github-job}" \
--junit-log-url "${{ inputs.junit-log-url }}" \
--comparison-images-url "${{ inputs.comparison-images-url }}" \
--retries "$retries"
# TODO: validate "$artifact_dir/_testoutput/test_results.json" against the schema
echo "artifact_dir=$artifact_dir" >> "$GITHUB_OUTPUT"
echo "upload=true" >> "$GITHUB_OUTPUT"
- name: Upload omni-github test results
if: always() && steps.convert.outputs.upload == 'true'
uses: actions/upload-artifact@v7
with:
name: ${{ inputs.artifact-prefix }}--v1-${{ github.repository_id }}-${{ github.run_id }}-${{ github.run_attempt }}-${{ job.check_run_id }}
path: ${{ steps.convert.outputs.artifact_dir }}
if-no-files-found: error
retention-days: ${{ inputs.retention-days }}
compression-level: 9
Loading
Loading