Skip to content
Prev Previous commit
Next Next commit
Revert "Try skipping mypy only on unit tests"
This reverts commit e306490.
  • Loading branch information
rmccorm4 committed Nov 16, 2025
commit 1c432a91a8fe6dfbfcc30f1a8a4420186fc084c1
12 changes: 2 additions & 10 deletions .github/actions/pytest/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,20 +54,12 @@ runs:
# Run pytest with detailed output and JUnit XML
set +e # Don't exit on test failures

# Disable mypy for unit tests to avoid CUDA cleanup segfaults (exit code 139)
# Unit tests import GPU framework modules which conflict with mypy's import system during cleanup
MYPY_FLAG=""
if [[ "${{ inputs.test_type }}" == *"unit"* ]]; then
MYPY_FLAG="-p no:mypy"
echo "Disabling mypy plugin for unit tests to avoid CUDA cleanup issues"
fi

docker run --runtime=nvidia --gpus all -w /workspace \
--cpus=${NUM_CPUS} \
--network host \
--name ${{ env.CONTAINER_ID }}_pytest \
${{ inputs.image_tag }} \
bash -c "mkdir -p /workspace/test-results && pytest -v --tb=short --basetemp=/tmp -o cache_dir=/tmp/.pytest_cache --junitxml=/workspace/test-results/${{ env.PYTEST_XML_FILE }} --durations=10 ${MYPY_FLAG} -m \"${{ inputs.pytest_marks }}\""
bash -c "mkdir -p /workspace/test-results && pytest -v --tb=short --basetemp=/tmp -o cache_dir=/tmp/.pytest_cache --junitxml=/workspace/test-results/${{ env.PYTEST_XML_FILE }} --durations=10 -m \"${{ inputs.pytest_marks }}\""

TEST_EXIT_CODE=$?
echo "TEST_EXIT_CODE=${TEST_EXIT_CODE}" >> $GITHUB_ENV
Expand Down Expand Up @@ -138,4 +130,4 @@ runs:
path: |
test-results/pytest_test_report_${{ inputs.framework }}_${{ env.STR_TEST_TYPE }}_${{ inputs.platform_arch }}.xml
test-results/test_metadata_${{ inputs.framework }}_${{ env.STR_TEST_TYPE }}_${{ inputs.platform_arch }}.json
retention-days: 7
retention-days: 7