Skip to content

test: add fragment for nightly CI smoke test #2

test: add fragment for nightly CI smoke test

test: add fragment for nightly CI smoke test #2

Workflow file for this run

# 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: Installation Tests
on:
pull_request:
types: [opened, synchronize, reopened]
push:
branches:
- main
- develop
- release/**
workflow_dispatch:
inputs:
base_image:
description: 'Docker base image for the test container'
required: false
default: 'ubuntu:24.04'
type: string
test_filter:
description: 'pytest -k filter expression (e.g. "uv" or "bugs")'
default: ''
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
permissions:
contents: read
pull-requests: read
jobs:
changes:
name: Detect Installation Test Changes
runs-on: ubuntu-latest
outputs:
run_install_tests: ${{ steps.detect.outputs.run_install_tests }}
steps:
- id: detect
env:
GH_TOKEN: ${{ github.token }}
PR_NUMBER: ${{ github.event.pull_request.number }}
run: |
set -euo pipefail
if [ "${{ github.event_name }}" != "pull_request" ]; then
echo "run_install_tests=true" >> "$GITHUB_OUTPUT"
exit 0
fi
changed_files="$(gh api --paginate "repos/${{ github.repository }}/pulls/${PR_NUMBER}/files" --jq '.[].filename')"
printf '%s\n' "$changed_files"
if printf '%s\n' "$changed_files" | grep -qE '^(apps/|tools/|source/|\.github/actions/run-package-tests/|\.github/workflows/install-ci\.yml$|VERSION$)|(^|/)pyproject\.toml$|(^|/)environment\.ya?ml$'; then
echo "run_install_tests=true" >> "$GITHUB_OUTPUT"
else
echo "run_install_tests=false" >> "$GITHUB_OUTPUT"
fi
install-tests:
name: Installation Tests
needs: [changes]
if: needs.changes.outputs.run_install_tests == 'true'
runs-on: [self-hosted, gpu]
timeout-minutes: 90
steps:
- name: Checkout
uses: actions/checkout@v6 # v6
- name: Run installation tests
env:
BASE_IMAGE: ${{ github.event_name == 'workflow_dispatch' && inputs.base_image || 'ubuntu:24.04' }}
TEST_FILTER: ${{ github.event_name == 'workflow_dispatch' && inputs.test_filter || '' }}
run: |
RUNNER_ARGS="--base-image $BASE_IMAGE"
RUNNER_ARGS="$RUNNER_ARGS --results-dir ${{ github.workspace }}/results"
RUNNER_ARGS="$RUNNER_ARGS --gpu"
PYTEST_EXTRA_ARGS=(-sv)
if [ -n "$TEST_FILTER" ]; then
PYTEST_EXTRA_ARGS+=(-k "$TEST_FILTER")
fi
tools/run_install_ci.py docker $RUNNER_ARGS -- --tb=short "${PYTEST_EXTRA_ARGS[@]}"
installation-tests-gate:
name: Installation Tests Gate
needs: [changes, install-tests]
if: always()
runs-on: ubuntu-latest
steps:
- name: Check installation test result
env:
CHANGES_RESULT: ${{ needs.changes.result }}
RUN_INSTALL_TESTS: ${{ needs.changes.outputs.run_install_tests }}
INSTALL_TESTS_RESULT: ${{ needs.install-tests.result }}
run: |
set -euo pipefail
if [ "$CHANGES_RESULT" != "success" ]; then
echo "Change detection failed with result: $CHANGES_RESULT"
exit 1
fi
if [ "$RUN_INSTALL_TESTS" != "true" ]; then
echo "Installation tests are not required for this change."
exit 0
fi
if [ "$INSTALL_TESTS_RESULT" != "success" ]; then
echo "Installation Tests did not pass: $INSTALL_TESTS_RESULT"
exit 1
fi
echo "Installation Tests passed."